diff --git a/modules/defaults.nix b/modules/defaults.nix index 3b3ccb8..00ef5da 100644 --- a/modules/defaults.nix +++ b/modules/defaults.nix @@ -1,15 +1,26 @@ { lib, ... }: +let + stateVersion = "25.05"; +in { - den.default.nixos.system.stateVersion = "25.11"; - den.default.homeManager.home.stateVersion = "25.11"; + den.default.nixos = { + system.stateVersion = stateVersion; - # enable hm by default - den.schema.user.classes = lib.mkDefault [ "homeManager" ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/Chicago"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; - # User TODO: REMOVE THIS - den.aspects.igneous.nixos = { - boot.loader.grub.enable = false; - fileSystems."/".device = "/dev/fake"; - fileSystems."/".fsType = "auto"; }; + den.default.homeManager.home.stateVersion = stateVersion; + + # enable hm by default + den.schema.user.classes = lib.mkDefault [ "homeManager" ]; } diff --git a/modules/hosts/flock.nix b/modules/hosts/flock.nix deleted file mode 100644 index 53704c1..0000000 --- a/modules/hosts/flock.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ den, ... }: -{ - den.hosts.x86_64-linux.flock.users.igneous = { }; - - # host aspect - den.aspects.flock = { - includes = [ - (den.batteries.hostname) - ]; - - # host NixOS configuration - nixos = - { pkgs, ... }: - { - environment.systemPackages = [ pkgs.hello ]; - }; - - # host provides default home environment for its users - provides.to-users.homeManager = - { pkgs, ... }: - { - home.packages = [ pkgs.vim ]; - }; - }; -} diff --git a/modules/hosts/flock/_hardware-configuration.nix b/modules/hosts/flock/_hardware-configuration.nix new file mode 100644 index 0000000..8872884 --- /dev/null +++ b/modules/hosts/flock/_hardware-configuration.nix @@ -0,0 +1,76 @@ +{ + config, + lib, + modulesPath, + ... +}: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/d3ca9f25-cb25-47f7-bc22-057ae7c2bad0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/BD87-0EDD"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + fileSystems."/mnt/hdd" = { + device = "/dev/disk/by-uuid/630cb307-7ae8-40f7-bc7e-651c1edb71b4"; + fsType = "ext4"; + }; + + fileSystems."/mnt/bigssd" = { + device = "/dev/nvme0n1p1"; + fsType = "ext4"; + }; + + fileSystems."/home/igneous/hdd" = { + depends = [ "/mnt/hdd" ]; + device = "/mnt/hdd/igneous"; + fsType = "none"; + options = [ + "bind" + "nofail" + ]; + }; + + fileSystems."/home/igneous/ssd" = { + depends = [ "/mnt/hdd" ]; + device = "/mnt/bigssd/igneous"; + fsType = "none"; + options = [ + "bind" + "nofail" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/00b900e9-a394-469b-b3e3-7fcc5b1346d5"; } + ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/hosts/flock/flock.nix b/modules/hosts/flock/flock.nix new file mode 100644 index 0000000..b7a9abf --- /dev/null +++ b/modules/hosts/flock/flock.nix @@ -0,0 +1,28 @@ +{ den, ... }: +{ + den.hosts.x86_64-linux.flock.users = { + igneous = { }; + }; + + # host aspect + den.aspects.flock = { + includes = [ + (den.batteries.hostname) + ]; + + # host NixOS configuration + nixos = + { pkgs, ... }: + { + imports = [ ./_hardware-configuration.nix ]; + + # Use latest kernel. + boot.kernelPackages = pkgs.linuxPackages_latest; + + environment.systemPackages = [ pkgs.hello ]; + + # Lets zsh completions work + environment.pathsToLink = [ "/share/zsh" ]; + }; + }; +}