diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ce3dce1e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/configuration.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 3f68a53a..00000000 --- a/configuration.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - imports = [ ./machines/pentos/default.nix ]; -} diff --git a/machines/oldtown/default.nix b/machines/oldtown/default.nix new file mode 100644 index 00000000..543f225a --- /dev/null +++ b/machines/oldtown/default.nix @@ -0,0 +1,44 @@ +{ config, pkgs, ... }: + +{ + imports = [ + + ./hardware.nix + ./secret.nix + ../../profiles/common/default.nix + ../../profiles/graphical/default.nix + ]; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + networking = { + hostName = "oldtown"; + wireless.enable = true; + interfaces = { + enp0s31f6.useDHCP = true; + wlp2s0.useDHCP = true; + }; + }; + + time.timeZone = "Europe/Brussels"; + + # This value determines the NixOS release from which the default + # 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.03"; + + home-manager.users.charlotte = { ... }: { + home.stateVersion = "20.03"; + }; + + # Machine-specific application settings + custom = { + git.email = "charlotte.vanpetegem@ugent.be"; + }; +} diff --git a/machines/oldtown/hardware.nix b/machines/oldtown/hardware.nix new file mode 100644 index 00000000..55379bb7 --- /dev/null +++ b/machines/oldtown/hardware.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ "i915" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/e4b7eae2-546d-412b-9258-389315f4b835"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/A4C4-7B9F"; + fsType = "vfat"; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/72c82e3c-ea61-488b-8b24-b3c27368a2ba"; } + ]; + + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = true; +} diff --git a/machines/oldtown/secret.nix b/machines/oldtown/secret.nix new file mode 100644 index 00000000..72ae63a4 Binary files /dev/null and b/machines/oldtown/secret.nix differ diff --git a/machines/pentos/default.nix b/machines/pentos/default.nix index 6530cb73..1d4b4f6c 100644 --- a/machines/pentos/default.nix +++ b/machines/pentos/default.nix @@ -9,14 +9,19 @@ ../../profiles/graphical/default.nix ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; - networking.hostName = "pentos"; - networking.wireless.enable = true; - - networking.interfaces.enp0s31f6.useDHCP = true; - networking.interfaces.wlp0s20f3.useDHCP = true; + networking = { + hostName = "pentos"; + wireless.enable = true; + interfaces = { + enp0s31f6.useDHCP = true; + wlp0s20f3.useDHCP = true; + }; + }; time.timeZone = "Europe/Brussels"; @@ -26,21 +31,14 @@ # 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.03"; - home-manager.users.charlotte = { pkgs, ... }: { - home = { - stateVersion = "20.03"; - }; + home-manager.users.charlotte = { ... }: { + home.stateVersion = "20.03"; }; # Machine-specific application settings custom = { git.email = "charlotte@vanpetegem.me"; }; - - system = { - autoUpgrade.enable = true; - }; - } diff --git a/profiles/graphical/default.nix b/profiles/graphical/default.nix index 1b98b94c..de6432e4 100644 --- a/profiles/graphical/default.nix +++ b/profiles/graphical/default.nix @@ -42,6 +42,10 @@ users.users.charlotte.extraGroups = [ "networkmanager" "video" "input" ]; + environment.systemPackages = with pkgs; [ eid-mw ]; + + system.autoUpgrade.enable = true; + home-manager.users.charlotte = { pkgs, ... }: { nixpkgs = { config = { @@ -51,7 +55,6 @@ home = { packages = with pkgs; [ chromium - eid-mw firefox hledger libreoffice diff --git a/profiles/graphical/secret.nix b/profiles/graphical/secret.nix index d3b1dc94..5496a97c 100644 Binary files a/profiles/graphical/secret.nix and b/profiles/graphical/secret.nix differ diff --git a/sample-configuration.nix b/sample-configuration.nix new file mode 100644 index 00000000..dbebd4f2 --- /dev/null +++ b/sample-configuration.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + imports = [ ./machines/oldtown/default.nix ]; +}