diff --git a/host/dasha/Configuration.nix b/host/dasha/Configuration.nix index 8ae4496..89947f4 100644 --- a/host/dasha/Configuration.nix +++ b/host/dasha/Configuration.nix @@ -1,26 +1,7 @@ -{ lib, pkgs, ... }: { +{ ... }: { imports = [ + ./Filesystem.nix ./Tablet.nix + ./Vpn.nix ]; - - environment.systemPackages = with pkgs; [ - networkmanager-l2tp - gnome.networkmanager-l2tp - # networkmanager_strongswan - # strongswan - # strongswanNM - ]; - - # Filesystems. - fileSystems."/storage/hot" = { - device = "/dev/storage/hot"; - fsType = "ext4"; - options = [ "nofail" ]; - }; - - fileSystems."/storage/cold" = { - device = "/dev/storage/cold"; - fsType = "ext4"; - options = [ "nofail" ]; - }; } diff --git a/host/dasha/Filesystem.nix b/host/dasha/Filesystem.nix new file mode 100644 index 0000000..c5c936d --- /dev/null +++ b/host/dasha/Filesystem.nix @@ -0,0 +1,13 @@ +{ ... }: { + fileSystems."/storage/hot" = { + device = "/dev/storage/hot"; + fsType = "ext4"; + options = [ "nofail" ]; + }; + + fileSystems."/storage/cold" = { + device = "/dev/storage/cold"; + fsType = "ext4"; + options = [ "nofail" ]; + }; +} diff --git a/host/dasha/Vpn.nix b/host/dasha/Vpn.nix new file mode 100644 index 0000000..b27a11f --- /dev/null +++ b/host/dasha/Vpn.nix @@ -0,0 +1,9 @@ +{ ... }: { + environment.systemPackages = with pkgs; [ + networkmanager-l2tp + gnome.networkmanager-l2tp + # networkmanager_strongswan + # strongswan + # strongswanNM + ]; +} diff --git a/host/desktop/Configuration.nix b/host/desktop/Configuration.nix index dc7158b..277f895 100644 --- a/host/desktop/Configuration.nix +++ b/host/desktop/Configuration.nix @@ -1,22 +1,5 @@ -{ config, pkgs, ... }: { - imports = [ ]; - - # Filesystems. - fileSystems."/storage/hot" = { - device = "/dev/storage/hot"; - fsType = "ext4"; - options = [ "nofail" ]; - }; - - fileSystems."/storage/cold_1" = { - device = "/dev/storage/cold_1"; - fsType = "ext4"; - options = [ "noauto" "nofail" ]; - }; - - fileSystems."/storage/cold_2" = { - device = "/dev/storage/cold_2"; - fsType = "ext4"; - options = [ "noauto" "nofail" ]; - }; +{ ... }: { + imports = [ + ./Filesystem.nix + ]; } diff --git a/host/desktop/Filesystem.nix b/host/desktop/Filesystem.nix new file mode 100644 index 0000000..262a38f --- /dev/null +++ b/host/desktop/Filesystem.nix @@ -0,0 +1,19 @@ +{ ... }: { + fileSystems."/storage/hot" = { + device = "/dev/storage/hot"; + fsType = "ext4"; + options = [ "nofail" ]; + }; + + fileSystems."/storage/cold_1" = { + device = "/dev/storage/cold_1"; + fsType = "ext4"; + options = [ "noauto" "nofail" ]; + }; + + fileSystems."/storage/cold_2" = { + device = "/dev/storage/cold_2"; + fsType = "ext4"; + options = [ "noauto" "nofail" ]; + }; +} diff --git a/host/fsight/Configuration.nix b/host/fsight/Configuration.nix index 6e31fb8..a3002fa 100644 --- a/host/fsight/Configuration.nix +++ b/host/fsight/Configuration.nix @@ -1,22 +1,6 @@ -{ lib, ... }: { - imports = [ ]; - - # Grub. - boot.loader.systemd-boot.enable = lib.mkForce false; - boot.loader.efi.canTouchEfiVariables = lib.mkForce false; - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.useOSProber = true; - - fileSystems."/" = lib.mkForce { - device = "/dev/sda2"; - fsType = "ext4"; - }; - fileSystems."/boot" = lib.mkForce { - device = "/dev/sda1"; - fsType = "vfat"; - }; - - # Root password. - users.users.root.hashedPassword = lib.mkForce "$y$j9T$d4HfwutZr.eNHuLJYRuro/$7swZfgCNS6jEXHFCxsW5um/68jX9BRiiZD1BYcm/gD/"; +{ ... }: { + imports = [ + ./Grub.nix + ./Root.nix + ]; } diff --git a/host/fsight/Grub.nix b/host/fsight/Grub.nix new file mode 100644 index 0000000..c51d9fc --- /dev/null +++ b/host/fsight/Grub.nix @@ -0,0 +1,16 @@ +{ lib, ... }: { + boot.loader.systemd-boot.enable = lib.mkForce false; + boot.loader.efi.canTouchEfiVariables = lib.mkForce false; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + fileSystems."/" = lib.mkForce { + device = "/dev/sda2"; + fsType = "ext4"; + }; + fileSystems."/boot" = lib.mkForce { + device = "/dev/sda1"; + fsType = "vfat"; + }; +} diff --git a/host/fsight/Root.nix b/host/fsight/Root.nix new file mode 100644 index 0000000..2d87185 --- /dev/null +++ b/host/fsight/Root.nix @@ -0,0 +1,3 @@ +{ lib, ... }: { + users.users.root.hashedPassword = lib.mkForce "$y$j9T$d4HfwutZr.eNHuLJYRuro/$7swZfgCNS6jEXHFCxsW5um/68jX9BRiiZD1BYcm/gD/"; +} diff --git a/host/home/Configuration.nix b/host/home/Configuration.nix index 24b167e..12da0bc 100644 --- a/host/home/Configuration.nix +++ b/host/home/Configuration.nix @@ -1,38 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ ... }: { imports = [ ./Backup.nix + ./Filesystem.nix + ./Network.nix ./Nextcloud.nix ./PhotosProcess.nix ./YandexMusic.nix ]; - - # Network. - networking.networkmanager.insertNameservers = [ - "1.1.1.1" - "8.8.8.8" - ]; - networking.extraHosts = '' - 10.1.0.2 git.voronind.com - 10.1.0.2 iot.voronind.com - 10.1.0.2 pass.voronind.com - ''; - - # Filesystems. - fileSystems."/storage/cold_1" = { - device = "/dev/storage/cold_1"; - fsType = "ext4"; - options = [ "nofail" ]; - }; - - fileSystems."/storage/cold_2" = { - device = "/dev/storage/cold_2"; - fsType = "ext4"; - options = [ "nofail" ]; - }; - - fileSystems."/storage/hot" = { - device = "/dev/storage/hot"; - fsType = "ext4"; - options = [ "nofail" ]; - }; } diff --git a/host/home/Filesystem.nix b/host/home/Filesystem.nix new file mode 100644 index 0000000..960f624 --- /dev/null +++ b/host/home/Filesystem.nix @@ -0,0 +1,19 @@ +{ ... }: { + fileSystems."/storage/cold_1" = { + device = "/dev/storage/cold_1"; + fsType = "ext4"; + options = [ "nofail" ]; + }; + + fileSystems."/storage/cold_2" = { + device = "/dev/storage/cold_2"; + fsType = "ext4"; + options = [ "nofail" ]; + }; + + fileSystems."/storage/hot" = { + device = "/dev/storage/hot"; + fsType = "ext4"; + options = [ "nofail" ]; + }; +} diff --git a/host/home/Network.nix b/host/home/Network.nix new file mode 100644 index 0000000..4470289 --- /dev/null +++ b/host/home/Network.nix @@ -0,0 +1,11 @@ +{ ... }: { + networking.networkmanager.insertNameservers = [ + "1.1.1.1" + "8.8.8.8" + ]; + networking.extraHosts = '' + 10.1.0.2 git.voronind.com + 10.1.0.2 iot.voronind.com + 10.1.0.2 pass.voronind.com + ''; +} diff --git a/host/laptop/Configuration.nix b/host/laptop/Configuration.nix index df49850..277f895 100644 --- a/host/laptop/Configuration.nix +++ b/host/laptop/Configuration.nix @@ -1,10 +1,5 @@ { ... }: { - imports = [ ]; - - # Filesystems. - fileSystems."/storage/hot" = { - device = "/dev/storage/hot"; - fsType = "ext4"; - options = [ "nofail" ]; - }; + imports = [ + ./Filesystem.nix + ]; } diff --git a/host/laptop/Filesystem.nix b/host/laptop/Filesystem.nix new file mode 100644 index 0000000..b0ec8e6 --- /dev/null +++ b/host/laptop/Filesystem.nix @@ -0,0 +1,7 @@ +{ ... }: { + fileSystems."/storage/hot" = { + device = "/dev/storage/hot"; + fsType = "ext4"; + options = [ "nofail" ]; + }; +} diff --git a/host/live/Configuration.nix b/host/live/Configuration.nix index 6e2aaec..7b01fbf 100644 --- a/host/live/Configuration.nix +++ b/host/live/Configuration.nix @@ -1,5 +1,3 @@ -{ config, pkgs, ... }: { +{ ... }: { imports = [ ]; - - environment.systemPackages = with pkgs; [ ]; } diff --git a/host/work/Configuration.nix b/host/work/Configuration.nix index 1fe68eb..5b51ee6 100644 --- a/host/work/Configuration.nix +++ b/host/work/Configuration.nix @@ -1,8 +1,6 @@ -{ config, lib, ... }: { +{ ... }: { imports = [ + ./Foot.nix ./Fprint.nix ]; - - # Foot font override. - environment.variables.FOOT_CONFIG = lib.mkForce ./foot/Foot.ini; } diff --git a/host/work/Foot.nix b/host/work/Foot.nix new file mode 100644 index 0000000..a0d632b --- /dev/null +++ b/host/work/Foot.nix @@ -0,0 +1,3 @@ +{ lib, ... }: { + environment.variables.FOOT_CONFIG = lib.mkForce ./foot/Foot.ini; +}