Moved services under modules folder, start of core module and modularization

+1 -1
README.md
··· 6 6 ## Module Structure 7 7 - Home -- Home-manager module configuration 8 8 - Hosts -- Host configuration 9 - - Services -- Services (mostly NixOS modules) 9 + - Modules -- NixOS module configuration 10 10 - Users -- User configuration 11 11 12 12 This flake is a work in progress. It is not super modular, does not follow best practices,
-19
configuration.nix
··· 16 16 kernelPackages = pkgs.linuxPackages_latest; 17 17 }; 18 18 19 - nix = { 20 - gc = { 21 - automatic = true; 22 - dates = "weekly"; 23 - options = "--delete-older-than 1w"; 24 - }; 25 - 26 - settings = { 27 - experimental-features = [ 28 - "nix-command" 29 - "flakes" 30 - ]; 31 - auto-optimise-store = true; 32 - }; 33 - }; 34 - 35 19 services.displayManager.gdm.enable = true; 36 20 services.desktopManager = { 37 21 gnome.enable = true; ··· 51 35 useXkbConfig = true; 52 36 }; 53 37 54 - i18n.defaultLocale = "en_US.UTF-8"; 55 38 networking.networkmanager.enable = true; 56 39 users.users.root.hashedPassword = "$6$rounds=4096$96V6gRPM96ADrBZr$2BOE2hC7Kx3XF3z32HNYp7zjsiAcJ2BynpGlWqdPupY3Mxfcy1aDlxdyx6HixriYuuhiTV4XSgObBASKZjNmF/"; 57 40 environment.systemPackages = with pkgs; [ ··· 75 58 }; 76 59 }; 77 60 78 - time.timeZone = "America/Los_Angeles"; 79 61 users.users = { 80 62 "freyja" = { 81 63 isNormalUser = true; ··· 84 66 shell = pkgs.nushell; 85 67 }; 86 68 }; 87 - system.stateVersion = "25.11"; 88 69 zramSwap.enable = true; 89 70 }
+30 -28
flake.nix
··· 32 32 ... 33 33 }@inputs: 34 34 { 35 - nixosConfigurations.bobcat = 36 - let 37 - username = "freyja"; 38 - specialArgs = { inherit username; }; 39 - hostname = "bobcat"; 40 - in 41 - nixpkgs.lib.nixosSystem { 42 - system = "x86_64-linux"; 43 - specialArgs = { 44 - inherit inputs; 35 + nixosConfigurations = { 36 + bobcat = 37 + let 38 + username = "freyja"; 39 + specialArgs = { inherit username; }; 40 + hostname = "bobcat"; 41 + in 42 + nixpkgs.lib.nixosSystem { 43 + system = "x86_64-linux"; 44 + specialArgs = { 45 + inherit inputs; 46 + }; 47 + modules = [ 48 + ./configuration.nix 49 + stylix.nixosModules.stylix 50 + nixos-hardware.nixosModules.lenovo-thinkpad-x280 51 + ./hosts/${hostname}/hardware-configuration.nix 52 + ./modules 53 + home-manager.nixosModules.home-manager 54 + { 55 + home-manager.useGlobalPkgs = true; 56 + home-manager.useUserPackages = true; 57 + home-manager.extraSpecialArgs = inputs // specialArgs; 58 + home-manager.users.${username} = ./users/${username}/home.nix; 59 + nixpkgs = { 60 + config.allowUnfree = true; 61 + }; 62 + } 63 + ]; 45 64 }; 46 - modules = [ 47 - ./configuration.nix 48 - stylix.nixosModules.stylix 49 - nixos-hardware.nixosModules.lenovo-thinkpad-x280 50 - ./hosts/${hostname}/hardware-configuration.nix 51 - ./services 52 - home-manager.nixosModules.home-manager 53 - { 54 - home-manager.useGlobalPkgs = true; 55 - home-manager.useUserPackages = true; 56 - home-manager.extraSpecialArgs = inputs // specialArgs; 57 - home-manager.users.${username} = ./users/${username}/home.nix; 58 - nixpkgs = { 59 - config.allowUnfree = true; 60 - }; 61 - } 62 - ]; 63 - }; 65 + }; 64 66 }; 65 67 }
+27
modules/core.nix
··· 1 + { lib, ... }: 2 + 3 + { 4 + system.stateVersion = "25.11"; 5 + 6 + time.timeZone = lib.mkDefault "America/Los_Angeles"; 7 + 8 + i18n.defaultLocale = lib.mkDefault "en_US.UTF-8"; 9 + 10 + nixpkgs.config.allowUnfree = lib.mkDefault true; 11 + 12 + nix = { 13 + gc = { 14 + automatic = true; 15 + dates = "weekly"; 16 + options = "--delete-older-than 1w"; 17 + }; 18 + 19 + settings = { 20 + experimental-features = [ 21 + "nix-command" 22 + "flakes" 23 + ]; 24 + auto-optimise-store = true; 25 + }; 26 + }; 27 + }
+6
modules/default.nix
··· 1 + { 2 + imports = [ 3 + ./services 4 + ./core.nix 5 + ]; 6 + }
services/default.nix modules/services/default.nix
services/flatpak.nix modules/services/flatpak.nix
services/fwupd.nix modules/services/fwupd.nix
services/keyd.nix modules/services/keyd.nix
services/pipewire.nix modules/services/pipewire.nix
services/tailscale.nix modules/services/tailscale.nix