diff --git a/host/hummelberg-new/filesystems.nix b/host/hummelberg-new/filesystems.nix deleted file mode 100644 index d07f1c7..0000000 --- a/host/hummelberg-new/filesystems.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, pkgs, lib, ... }: { - boot.initrd.luks.devices = { - "root".device = "/dev/disk/by-uuid/fae1b81e-894c-47b4-92e5-0a817fd6f66f"; - "swap".device = "/dev/disk/by-uuid/dc1fe9ff-7eb7-40c3-8fbd-d99398e5e5d6"; - }; - - fileSystems = { - "/" = { - device = "/dev/mapper/root"; - fsType = "btrfs"; - options = [ "subvol=nixos" ]; - }; - "/home" = { - device = "/dev/mapper/root"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; - "/boot" = { - device = "/dev/disk/by-uuid/1FB9-3DB0"; - fsType = "vfat"; - }; - }; - - swapDevices = [{ device = "/dev/mapper/swap"; }]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - -} diff --git a/host/hummelberg-new/networking.nix b/host/hummelberg-new/networking.nix deleted file mode 100644 index fb1edb0..0000000 --- a/host/hummelberg-new/networking.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, pkgs, ... }: - -{ - - networking = { - networkmanager.enable = true; - useDHCP = false; - #wireless.enable = true; # Enables wireless support via wpa_supplicant. - hostName = "hummelberg-new"; - }; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - #networking.wireguard.enable = true; - #networking.wireguard.interfaces = let - # meta = import ../../meta; - # vnetworks = meta.network.virtual; - # vnetworkName = "mgmt"; - #in { - # "wg-${vnetworkName}" = - # pkgs.lib.qois.wireguard.makeInterface config.networking.hostName - # vnetworkName vnetworks.${vnetworkName}; - #}; -} diff --git a/host/hummelberg-new/default.nix b/host/hummelberg-old/default.nix similarity index 54% rename from host/hummelberg-new/default.nix rename to host/hummelberg-old/default.nix index fd19914..4b0817b 100644 --- a/host/hummelberg-new/default.nix +++ b/host/hummelberg-old/default.nix @@ -3,40 +3,28 @@ imports = [ ./filesystems.nix ./networking.nix - #./printing.nix + ./printing.nix #./backup.nix #TODO: Extract applications from desktop role - ../../hardware/thinkpad-p14s.nix + ../../hardware/dell-precision-3530.nix ../../defaults/base ../../defaults/cifs-auth-fix ../../defaults/desktop - #../../defaults/games - ../../defaults/user-configuration - ../../defaults/user-configuration/fhauser - #../../defaults/printing + ../../defaults/development-tools + ../../defaults/games + ../../defaults/printing ]; - #TODO: Clean up next section - services.xserver.dpi = 180; - - virtualisation = { # TODO: This should probably be somewhere else. - docker = { - enable = true; - enableOnBoot = false; - }; - libvirtd.enable = true; - }; - # Set your time zone. time.timeZone = "Europe/Amsterdam"; # This value determines the NixOS release from which the default - # settings for stateful data, like fi:le locations and database versions + # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "20.09"; # Did you read the comment? + system.stateVersion = "20.03"; # Did you read the comment? } diff --git a/host/hummelberg-old/filesystems.nix b/host/hummelberg-old/filesystems.nix new file mode 100644 index 0000000..2a89b97 --- /dev/null +++ b/host/hummelberg-old/filesystems.nix @@ -0,0 +1,64 @@ +{ config, pkgs, lib, ... }: +let + networkShares = let + hsr_options = [ + "defaults" + "noauto" + #"iocharset=utf8" + "soft" + "user=fhauser" + "domain=hsr.ch" + "uid=1000" + "gid=1000" + ]; + hsr_share = share_name: + { domain ? "hsr.ch/root", path ? share_name, extra_options ? [ ] }: + lib.nameValuePair "/mnt/hsr/${share_name}" { + device = "//${domain}/${path}"; + fsType = "cifs"; + options = hsr_options ++ extra_options; + noCheck = true; + }; + in lib.mapAttrs' hsr_share { + "skripte".path = "alg/skripte"; + "scratch".path = "alg/scratch"; + "fhauser".domain = "c101.hsr.ch"; + #"fabian.hauser".domain = "svm-c113.ost.ch"; # User! + "afe" = { }; + "auw" = { }; + "ebooks" = { + path = "alg/ebooks"; + extra_options = [ "ro" ]; + }; + }; + +in { + boot.initrd.luks.devices = { + "root".device = "/dev/disk/by-uuid/28d2914f-c053-40a8-ad90-f2743190c772"; + "swap".device = "/dev/disk/by-uuid/ed89158d-4460-4012-86d7-f8761127371c"; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35"; + fsType = "btrfs"; + options = [ "subvol=nixos" ]; + }; + "/home" = { + device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/E86E-3C6C"; + fsType = "vfat"; + }; + } // networkShares; + + swapDevices = [{ device = "/dev/mapper/swap"; }]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + +} diff --git a/host/hummelberg-old/networking.nix b/host/hummelberg-old/networking.nix new file mode 100644 index 0000000..61cc2fd --- /dev/null +++ b/host/hummelberg-old/networking.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +{ + + networking = { + networkmanager.enable = true; + useDHCP = false; + #wireless.enable = true; # Enables wireless support via wpa_supplicant. + hostName = "hummelberg"; + }; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + networking.wireguard.enable = true; + networking.wireguard.interfaces = let + meta = import ../../meta; + vnetworks = meta.network.virtual; + vnetworkName = "mgmt"; + in { + "wg-${vnetworkName}" = + pkgs.lib.qois.wireguard.makeInterface config.networking.hostName + vnetworkName vnetworks.${vnetworkName}; + }; +} diff --git a/host/hummelberg-new/printing.nix b/host/hummelberg-old/printing.nix similarity index 100% rename from host/hummelberg-new/printing.nix rename to host/hummelberg-old/printing.nix diff --git a/host/hummelberg/default.nix b/host/hummelberg/default.nix index 4b0817b..fd19914 100644 --- a/host/hummelberg/default.nix +++ b/host/hummelberg/default.nix @@ -3,28 +3,40 @@ imports = [ ./filesystems.nix ./networking.nix - ./printing.nix + #./printing.nix #./backup.nix #TODO: Extract applications from desktop role - ../../hardware/dell-precision-3530.nix + ../../hardware/thinkpad-p14s.nix ../../defaults/base ../../defaults/cifs-auth-fix ../../defaults/desktop - ../../defaults/development-tools - ../../defaults/games - ../../defaults/printing + #../../defaults/games + ../../defaults/user-configuration + ../../defaults/user-configuration/fhauser + #../../defaults/printing ]; + #TODO: Clean up next section + services.xserver.dpi = 180; + + virtualisation = { # TODO: This should probably be somewhere else. + docker = { + enable = true; + enableOnBoot = false; + }; + libvirtd.enable = true; + }; + # Set your time zone. time.timeZone = "Europe/Amsterdam"; # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions + # settings for stateful data, like fi:le locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "20.03"; # Did you read the comment? + system.stateVersion = "20.09"; # Did you read the comment? } diff --git a/host/hummelberg/filesystems.nix b/host/hummelberg/filesystems.nix index 2a89b97..d07f1c7 100644 --- a/host/hummelberg/filesystems.nix +++ b/host/hummelberg/filesystems.nix @@ -1,59 +1,25 @@ -{ config, pkgs, lib, ... }: -let - networkShares = let - hsr_options = [ - "defaults" - "noauto" - #"iocharset=utf8" - "soft" - "user=fhauser" - "domain=hsr.ch" - "uid=1000" - "gid=1000" - ]; - hsr_share = share_name: - { domain ? "hsr.ch/root", path ? share_name, extra_options ? [ ] }: - lib.nameValuePair "/mnt/hsr/${share_name}" { - device = "//${domain}/${path}"; - fsType = "cifs"; - options = hsr_options ++ extra_options; - noCheck = true; - }; - in lib.mapAttrs' hsr_share { - "skripte".path = "alg/skripte"; - "scratch".path = "alg/scratch"; - "fhauser".domain = "c101.hsr.ch"; - #"fabian.hauser".domain = "svm-c113.ost.ch"; # User! - "afe" = { }; - "auw" = { }; - "ebooks" = { - path = "alg/ebooks"; - extra_options = [ "ro" ]; - }; - }; - -in { +{ config, pkgs, lib, ... }: { boot.initrd.luks.devices = { - "root".device = "/dev/disk/by-uuid/28d2914f-c053-40a8-ad90-f2743190c772"; - "swap".device = "/dev/disk/by-uuid/ed89158d-4460-4012-86d7-f8761127371c"; + "root".device = "/dev/disk/by-uuid/fae1b81e-894c-47b4-92e5-0a817fd6f66f"; + "swap".device = "/dev/disk/by-uuid/dc1fe9ff-7eb7-40c3-8fbd-d99398e5e5d6"; }; fileSystems = { "/" = { - device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35"; + device = "/dev/mapper/root"; fsType = "btrfs"; options = [ "subvol=nixos" ]; }; "/home" = { - device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35"; + device = "/dev/mapper/root"; fsType = "btrfs"; options = [ "subvol=home" ]; }; "/boot" = { - device = "/dev/disk/by-uuid/E86E-3C6C"; + device = "/dev/disk/by-uuid/1FB9-3DB0"; fsType = "vfat"; }; - } // networkShares; + }; swapDevices = [{ device = "/dev/mapper/swap"; }]; diff --git a/host/hummelberg/networking.nix b/host/hummelberg/networking.nix index 61cc2fd..96d5c92 100644 --- a/host/hummelberg/networking.nix +++ b/host/hummelberg/networking.nix @@ -13,14 +13,14 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - networking.wireguard.enable = true; - networking.wireguard.interfaces = let - meta = import ../../meta; - vnetworks = meta.network.virtual; - vnetworkName = "mgmt"; - in { - "wg-${vnetworkName}" = - pkgs.lib.qois.wireguard.makeInterface config.networking.hostName - vnetworkName vnetworks.${vnetworkName}; - }; + #networking.wireguard.enable = true; + #networking.wireguard.interfaces = let + # meta = import ../../meta; + # vnetworks = meta.network.virtual; + # vnetworkName = "mgmt"; + #in { + # "wg-${vnetworkName}" = + # pkgs.lib.qois.wireguard.makeInterface config.networking.hostName + # vnetworkName vnetworks.${vnetworkName}; + #}; }