mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
pre-format
This commit is contained in:
parent
3ad599c6aa
commit
de7683556e
21 changed files with 462 additions and 403 deletions
|
|
@ -23,7 +23,7 @@
|
|||
defaultSession = "none+dwm";
|
||||
};
|
||||
windowManager.session =
|
||||
lib.singleton
|
||||
[
|
||||
{
|
||||
name = "dwm";
|
||||
start = ''
|
||||
|
|
@ -43,7 +43,8 @@
|
|||
dont_stop &
|
||||
waitPID=$!
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit
|
||||
|
|
|
|||
|
|
@ -61,9 +61,10 @@ in {
|
|||
pkgs.brightnessctl #brightness control for laptop
|
||||
pkgs.playerctl #music control
|
||||
pkgs.xclip
|
||||
pkgs.coreutils
|
||||
];
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.sxhkd}/bin/sxhkd -c ${configFile} &";
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${lib.getExe' pkgs.sxhkd "sxhkd"} -c ${configFile} &
|
||||
'';
|
||||
}
|
||||
)
|
||||
];
|
||||
|
|
|
|||
87
modules/boot.nix
Normal file
87
modules/boot.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{self, ...}: {
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options.local.bootConfig.disable = lib.mkEnableOption "";
|
||||
config = lib.mkIf (!config.local.bootConfig.disable) {
|
||||
environment.etc = {
|
||||
"issue" = {
|
||||
text = "[?12l[?25h";
|
||||
mode = "0444";
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
blacklistedKernelModules = ["pcspkr"];
|
||||
kernelParams = lib.mkAfter [
|
||||
"acpi_call"
|
||||
"pti=auto"
|
||||
"randomize_kstack_offset=on"
|
||||
"vsyscall=none"
|
||||
"slab_nomerge"
|
||||
"module.sig_enforce=1"
|
||||
"lockdown=confidentiality"
|
||||
"page_poison=1"
|
||||
"page_alloc.shuffle=1"
|
||||
"sysrq_always_enabled=0"
|
||||
"idle=nomwait"
|
||||
"rootflags=noatime"
|
||||
"iommu=pt"
|
||||
"usbcore.autosuspend=-1"
|
||||
"noresume"
|
||||
"acpi_backlight=native"
|
||||
"logo.nologo"
|
||||
"fbcon=nodefer"
|
||||
"bgrt_disable"
|
||||
"systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"vt.global_cursor_default=0"
|
||||
"quiet"
|
||||
"splash"
|
||||
];
|
||||
consoleLogLevel = 3;
|
||||
initrd = {
|
||||
verbose = false;
|
||||
|
||||
systemd.enable = true;
|
||||
};
|
||||
plymouth = {
|
||||
enable = lib.mkDefault true;
|
||||
theme = "breeze";
|
||||
logo = "${self.packages.${pkgs.system}.images}/logo.png";
|
||||
};
|
||||
loader = {
|
||||
grub = {
|
||||
configurationLimit = 10;
|
||||
extraConfig = ''
|
||||
GRUB_TIMEOUT_STYLE=hidden
|
||||
'';
|
||||
};
|
||||
systemd-boot = {
|
||||
configurationLimit = 10;
|
||||
enable = lib.mkDefault true;
|
||||
consoleMode = "max";
|
||||
editor = false;
|
||||
};
|
||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
systemd.services.efibootmgr = {
|
||||
reloadIfChanged = false;
|
||||
restartIfChanged = false;
|
||||
stopIfChanged = false;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
path = [pkgs.efibootmgr];
|
||||
wantedBy = ["default.target"];
|
||||
script = ''
|
||||
efibootmgr -t 0
|
||||
'';
|
||||
};
|
||||
};
|
||||
_file = ./misc.nix;
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
{self, ...}: {
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
options.local.bootConfig.disable = lib.mkEnableOption "";
|
||||
config =
|
||||
lib.mkIf (!config.local.bootConfig.disable)
|
||||
{
|
||||
environment.etc = {
|
||||
"issue" = {
|
||||
text = "[?12l[?25h";
|
||||
mode = "0444";
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
blacklistedKernelModules = ["pcspkr"];
|
||||
kernelParams = [
|
||||
"acpi_call"
|
||||
"pti=auto"
|
||||
"randomize_kstack_offset=on"
|
||||
"vsyscall=none"
|
||||
"slab_nomerge"
|
||||
"module.sig_enforce=1"
|
||||
"lockdown=confidentiality"
|
||||
"page_poison=1"
|
||||
"page_alloc.shuffle=1"
|
||||
"sysrq_always_enabled=0"
|
||||
"idle=nomwait"
|
||||
"rootflags=noatime"
|
||||
"iommu=pt"
|
||||
"usbcore.autosuspend=-1"
|
||||
"noresume"
|
||||
"acpi_backlight=native"
|
||||
"logo.nologo"
|
||||
"fbcon=nodefer"
|
||||
"bgrt_disable"
|
||||
"quiet"
|
||||
"systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"vt.global_cursor_default=0"
|
||||
];
|
||||
consoleLogLevel = 3;
|
||||
initrd = {
|
||||
verbose = false;
|
||||
|
||||
systemd.enable = true;
|
||||
};
|
||||
plymouth = {
|
||||
enable = lib.mkDefault true;
|
||||
theme = "breeze";
|
||||
logo = "${self.packages.${pkgs.system}.images}/logo.png";
|
||||
};
|
||||
loader = {
|
||||
grub = {
|
||||
configurationLimit = 10;
|
||||
extraConfig = ''
|
||||
GRUB_TIMEOUT_STYLE=hidden
|
||||
'';
|
||||
};
|
||||
systemd-boot = {
|
||||
configurationLimit = 10;
|
||||
enable = lib.mkDefault true;
|
||||
consoleMode = "max";
|
||||
editor = false;
|
||||
};
|
||||
efi.canTouchEfiVariables = lib.mkDefault true;
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
systemd.services.efibootmgr = {
|
||||
reloadIfChanged = false;
|
||||
restartIfChanged = false;
|
||||
stopIfChanged = false;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
path = [pkgs.efibootmgr];
|
||||
wantedBy = ["default.target"];
|
||||
script = ''
|
||||
efibootmgr -t 0
|
||||
'';
|
||||
};
|
||||
};
|
||||
_file = ./misc.nix;
|
||||
}
|
||||
|
|
@ -18,11 +18,9 @@ _: {
|
|||
max-jobs = 0;
|
||||
substituters = [
|
||||
"ssh-ng://nix-ssh@gerg-desktop"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"gerg-desktop:6p1+h6jQnb1MOt3ra3PlQpfgEEF4zRrQWiEuAqcjBj8="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
};
|
||||
distributedBuilds = true;
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
_: {lib, ...}: {
|
||||
options = {
|
||||
local.keys = lib.mkOption {
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
local.keys = {
|
||||
gerg_gerg-phone = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDU6BnoHIgMLgZVGuvi03J9l5Z1yP1P5Q8QPyjRHyi77";
|
||||
gerg_gerg-windows = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILpYY2uw0OH1Re+3BkYFlxn0O/D8ryqByJB/ljefooNc";
|
||||
root_moms-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq9YTf4jlVCKBKn44m4yJvj94C7pTOyaa4VjZFohNqD";
|
||||
root_game-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUKHZasYQUAmRBiqtx1drDxfq18/N4rKydCtPHx461I";
|
||||
root_gerg-desktop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIeHsGcmOdIMzV+SNe4WFcA3CPHCNb1aqxThkXtm7G/1";
|
||||
gerg-desktop_fingerprint = "BQxvBOWsTw1gdNDR0KzrSRmbVhDrJdG05vYXkVmw8yA";
|
||||
gerg_gerg-desktop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJWbwkFJmRBgyWyWU+w3ksZ+KuFw9uXJN3PwqqE7Z/i8";
|
||||
};
|
||||
options.local.keys = lib.mkOption {};
|
||||
|
||||
config.local.keys = {
|
||||
gerg_gerg-phone = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDU6BnoHIgMLgZVGuvi03J9l5Z1yP1P5Q8QPyjRHyi77";
|
||||
gerg_gerg-windows = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILpYY2uw0OH1Re+3BkYFlxn0O/D8ryqByJB/ljefooNc";
|
||||
root_moms-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq9YTf4jlVCKBKn44m4yJvj94C7pTOyaa4VjZFohNqD";
|
||||
root_game-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUKHZasYQUAmRBiqtx1drDxfq18/N4rKydCtPHx461I";
|
||||
root_gerg-desktop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIeHsGcmOdIMzV+SNe4WFcA3CPHCNb1aqxThkXtm7G/1";
|
||||
gerg-desktop_fingerprint = "BQxvBOWsTw1gdNDR0KzrSRmbVhDrJdG05vYXkVmw8yA";
|
||||
gerg_gerg-desktop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJWbwkFJmRBgyWyWU+w3ksZ+KuFw9uXJN3PwqqE7Z/i8";
|
||||
};
|
||||
_file = ./keys.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,17 +18,17 @@ _: {
|
|||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.local.allowedUnfree;
|
||||
};
|
||||
};
|
||||
|
||||
programs.git.enable = true;
|
||||
|
||||
environment.defaultPackages = lib.mkForce (builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
alsa-utils #volume control
|
||||
bottom #view tasks
|
||||
efibootmgr #efi editor
|
||||
nix-output-monitor #nom nom nom nom;
|
||||
nix-tree #view packages
|
||||
pciutils #lspci
|
||||
xclip #commandline clipboard access
|
||||
;
|
||||
});
|
||||
|
||||
|
|
@ -43,14 +43,17 @@ _: {
|
|||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
#time settings
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
# For`info` command.
|
||||
|
||||
# For `info` command.
|
||||
documentation.info.enable = false;
|
||||
# NixOS manual and such.
|
||||
documentation.nixos.enable = false;
|
||||
|
||||
# Useless with flakes (without configuring)
|
||||
programs.command-not-found.enable = false;
|
||||
};
|
||||
_file = ./misc.nix;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{fetch-rs, ...}: {
|
||||
{
|
||||
fetch-rs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
|
|
@ -72,16 +76,9 @@
|
|||
syntaxHighlighting.enable = true;
|
||||
histSize = 10000;
|
||||
histFile = "$HOME/.cache/zsh_history";
|
||||
interactiveShellInit = let
|
||||
fzf-tab = pkgs.fetchFromGitHub {
|
||||
owner = "Aloxaf";
|
||||
repo = "fzf-tab";
|
||||
rev = "c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9";
|
||||
hash = "sha256-gvZp8P3quOtcy1Xtt1LAW1cfZ/zCtnAmnWqcwrKel6w=";
|
||||
};
|
||||
in ''
|
||||
interactiveShellInit = ''
|
||||
### fzf-tab ###
|
||||
source ${fzf-tab}/fzf-tab.plugin.zsh
|
||||
source ${self.packages.${pkgs.system}.fzf-tab}/fzf-tab.plugin.zsh
|
||||
### pager ###
|
||||
man () {
|
||||
PROGRAM="''${@[-1]}"
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ in {
|
|||
platformTheme = "gtk2";
|
||||
};
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
xrdb -load /etc/xdg/Xresources
|
||||
${lib.getExe' pkgs.xorg.xrdb "xrdb"} -load /etc/xdg/Xresources
|
||||
'';
|
||||
fonts = {
|
||||
packages = [pkgs.overpass];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue