From b8a4e9ecee3679fb25e62836dba53e3e61dc306e Mon Sep 17 00:00:00 2001 From: traxys Date: Wed, 17 Apr 2024 19:50:06 +0200 Subject: [PATCH] ZeNixLaptop: init --- flake.nix | 6 ++- hostconfig/ZeNixLaptop/extra_info.nix | 5 +++ .../ZeNixLaptop/hardware-configuration.nix | 33 ++++++++++++++ hostconfig/ZeNixLaptop/hm.nix | 9 ++++ hostconfig/ZeNixLaptop/nixos.nix | 43 +++++++++++++++++++ 5 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 hostconfig/ZeNixLaptop/extra_info.nix create mode 100644 hostconfig/ZeNixLaptop/hardware-configuration.nix create mode 100644 hostconfig/ZeNixLaptop/hm.nix create mode 100644 hostconfig/ZeNixLaptop/nixos.nix diff --git a/flake.nix b/flake.nix index e3f3312..5bcf5c1 100644 --- a/flake.nix +++ b/flake.nix @@ -452,7 +452,8 @@ ZeNixLaptop = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = [ - ./hostconfig/ZeNixComputa/extra_info.nix + ./hostconfig/ZeNixLaptop/extra_info.nix + ./hostconfig/ZeNixLaptop/nixos.nix self.nixosModules.minimal self.nixosModules.personal-cli self.nixosModules.personal-gui @@ -478,10 +479,13 @@ ... }: { imports = [ + ./hostconfig/ZeNixLaptop/extra_info.nix + ./hostconfig/ZeNixLaptop/hm.nix self.hmModules.minimal self.hmModules.personal-cli self.hmModules.personal-gui self.hmModules.gaming + inputs.fioul.homeManagerModules.default ]; }; home-manager.extraSpecialArgs = { diff --git a/hostconfig/ZeNixLaptop/extra_info.nix b/hostconfig/ZeNixLaptop/extra_info.nix new file mode 100644 index 0000000..991bd7f --- /dev/null +++ b/hostconfig/ZeNixLaptop/extra_info.nix @@ -0,0 +1,5 @@ +{ + extraInfo.username = "traxys"; + + extraInfo.email = "quentin+dev@familleboyer.net"; +} diff --git a/hostconfig/ZeNixLaptop/hardware-configuration.nix b/hostconfig/ZeNixLaptop/hardware-configuration.nix new file mode 100644 index 0000000..0655fba --- /dev/null +++ b/hostconfig/ZeNixLaptop/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; + boot.initrd.kernelModules = ["dm-snapshot"]; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + boot.kernelParams = ["iomem=relaxed"]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/95baa216-c7f1-418d-be70-cd1d4102c837"; + fsType = "btrfs"; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-uuid/50e43b17-10c8-4bbe-893a-c709172867db"; + fsType = "btrfs"; + }; + + swapDevices = [ + ]; +} diff --git a/hostconfig/ZeNixLaptop/hm.nix b/hostconfig/ZeNixLaptop/hm.nix new file mode 100644 index 0000000..f0d5bf3 --- /dev/null +++ b/hostconfig/ZeNixLaptop/hm.nix @@ -0,0 +1,9 @@ +{config, ...}: { + programs.git = { + userName = "traxys"; + userEmail = config.extraInfo.email; + }; + + traxys.waybar.modules."battery".enable = true; + home.stateVersion = "21.11"; +} diff --git a/hostconfig/ZeNixLaptop/nixos.nix b/hostconfig/ZeNixLaptop/nixos.nix new file mode 100644 index 0000000..8341ca6 --- /dev/null +++ b/hostconfig/ZeNixLaptop/nixos.nix @@ -0,0 +1,43 @@ +{ + imports = [ + ./hardware-configuration.nix + ]; + + boot = { + initrd = { + luks.devices = { + root = { + device = "/dev/disk/by-uuid/de0242ac-788a-44fc-a1ef-8d7bfaa448c6"; + preLVM = true; + #keyFile = "/etc/secrets/initrd/keyfile"; + fallbackToPassword = true; + }; + home = { + device = "/dev/disk/by-uuid/b028c674-64c5-40e0-88c4-481d78854049"; + preLVM = true; + #keyFile = "/etc/secrets/initrd/keyfile"; + fallbackToPassword = true; + }; + }; + secrets = { + "/etc/secrets/initrd/keyfile" = "/etc/secrets/initrd/keyfile"; + }; + #kernelParams = [ "iomem=relaxed" ]; + }; + loader = { + grub = { + enable = true; + version = 2; + device = "nodev"; + enableCryptodisk = true; + }; + }; + }; + + networking.hostName = "ZeNixLaptop"; + + time.timeZone = "Europe/Paris"; + hardware.opengl.enable = true; + + system.stateVersion = "21.05"; +}