diff options
| -rw-r--r-- | flake.nix | 382 | ||||
| -rw-r--r-- | machines/betsy/default.nix (renamed from machines/betsy/configuration.nix) | 11 | ||||
| -rw-r--r-- | machines/bosco/default.nix (renamed from machines/bosco/configuration.nix) | 8 | ||||
| -rw-r--r-- | machines/doretta/default.nix (renamed from machines/doretta/configuration.nix) | 9 | ||||
| -rw-r--r-- | machines/khad/default.nix (renamed from machines/khad/configuration.nix) | 23 | ||||
| -rw-r--r-- | machines/picast/default.nix (renamed from machines/picast/configuration.nix) | 8 | ||||
| -rw-r--r-- | machines/zenbook/default.nix (renamed from machines/zenbook/configuration.nix) | 18 | ||||
| -rw-r--r-- | modules/nixos/system-packages.nix | 6 |
8 files changed, 225 insertions, 240 deletions
@@ -138,7 +138,7 @@ }; - outputs = inputs@{ self, ...}: with inputs; { + outputs = inputs@{ ... }: with inputs; # packages.aarch64-linux = { # # packages.x86_64-linux = { # aarch64-installer = nixos-generators.nixosGenerate { @@ -151,238 +151,156 @@ # format = "sd-aarch64-installer"; # }; # }; - # let - # inherit (self) outputs; - # lib = nixpkgs.lib //home-manager.lib; - # systems = [ "x86_64-linux" ]; - # forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); - # pkgsFor = lib.genAttrs systems (system: import nixpkgs { - # inherit system; - # config.allowUnfreee = true; - # }); - # in { - # inherit lib; - # nixosModules = import ./modules/nixos; - # homeManagerModules = import ./modules/home-manager; - # # templates = import ./templates; - - # # overlays = import ./overlays { inherit inputs outputs; }; - # # hydraJobs = import ./hydra.nix { inherit inputs outputs; }; - - # packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; }); - # # devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; }); - # # formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt); - - # # wallpapers = inherit wallpapers; #NOTE broken - - # nixosConfigurations = { - # # Main desktop - # khad = lib.nixosSystem { - # modules = [ ./machines/khad ]; - # specialArgs = { inherit inputs outputs; }; - # }; - # # Personal laptop - # nixos-zenbook = lib.nixosSystem { - # modules = [ ./machines/khad ]; - # specialArgs = { inherit inputs outputs; }; - # }; - # }; - - # homeConfigurations = { - # # Desktop - # "defin@khad" = lib.homeManagerConfiguration { - # modules = [ ./home-manager/home.nix ]; - # pkgs = pkgsFor.x86_64-linux; - # extraSpecialArgs = { inherit inputs outputs; }; - # }; - # # Laptop - # "defin@nixos-zenbook" = lib.homeManagerConfiguration { - # modules = [ ./home-manager/home.nix ]; - # pkgs = pkgsFor.x86_64-linux; - # extraSpecialArgs = { inherit inputs outputs; }; - # }; - # }; - # }; - - nixosConfigurations = { - live = nixpkgs.lib.nixosSystem { - modules = [ - (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") - ./machines/iso/configuration.nix - ./modules/users/defin.nix - ./modules/nixos/system-packages.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/default.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - } - { nixpkgs.hostPlatform = "aarch64-linux"; } - ]; - }; - livetest = nixpkgs.lib.nixosSystem { - modules = [ - (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") - { nixpkgs.hostPlatform = "aarch64-linux"; } - ]; - }; - - zenbook = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - ./machines/zenbook/configuration.nix - lix-module.nixosModules.default - - # Default users - ./modules/users/defin.nix - ./modules/users/root.nix - - # hyprland.homeManagerModules.default {wayland.windowManager.hyprland.enable = true;} - ./modules/nixos/hyprland.nix - - home-manager.nixosModules.home-manager { - - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/home.nix; - - home-manager.extraSpecialArgs = { inherit inputs; }; - } - - ./modules/nixos/asus-numpad-touchpad.nix - ./modules/nixos/bluetooth.nix - ./modules/nixos/environment.nix - ./modules/nixos/kde-connect.nix - ./modules/nixos/nix-common.nix - ./modules/nixos/services.nix - ./modules/nixos/tailscale.nix - ./modules/nixos/steam.nix - # ./modules/nixos/sway.nix - ./modules/nixos/system-packages.nix - - # # Let 'nixos-version --json' know the Git revision of this flake. - # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; - # nix.registry.nixpkgs.flake = nixpkgs; - ]; - }; - - betsy = nixpkgs.lib.nixosSystem { # this is my work laptop - modules = [ - ./machines/betsy/configuration.nix - # lix-module.nixosModules.default - - ./modules/nixos/bluetooth.nix - ./modules/nixos/nix-common.nix - ./modules/nixos/environment.nix - ./modules/nixos/tailscale.nix - ./modules/nixos/system-packages.nix - ./modules/nixos/services.nix - - ./modules/users/defin.nix - ./modules/users/root.nix - ./modules/users/jerry.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/home.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - } - ]; - }; - doretta = nixpkgs.lib.nixosSystem { # this is my build server - modules = [ - ./machines/doretta/configuration.nix - lix-module.nixosModules.default - - ./modules/nixos/nix-common.nix - ./modules/nixos/environment.nix - ./modules/nixos/tailscale.nix - ./modules/nixos/system-packages.nix - - ./modules/users/defin.nix - ./modules/users/git.nix - ./modules/users/root.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/doretta.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - } - ]; - }; - bosco = nixpkgs.lib.nixosSystem { # this is my networking server - modules = [ - ./machines/bosco/configuration.nix - # lix-module.nixosModules.default - - ./modules/nixos/nix-common.nix - ./modules/nixos/environment.nix - ./modules/nixos/tailscale.nix - ./modules/nixos/cgit.nix - ./modules/nixos/system-packages.nix - ./modules/users/defin.nix - ./modules/users/root.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/default.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - } - - ./modules/nixos/headscale.nix - ]; + let + # inherit (self) outputs; + lib = nixpkgs.lib //home-manager.lib; + systems = [ "x86_64-linux" "aarch64-linux" ]; + # forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs systems (system: import nixpkgs { + inherit system; + config.allowUnfreee = true; + }); + in { + inherit lib; + nixosModules = import ./modules/nixos; + # homeManagerModules = import ./modules/home-manager; + # templates = import ./templates; + + # overlays = import ./overlays { inherit inputs outputs; }; + # hydraJobs = import ./hydra.nix { inherit inputs outputs; }; + + # packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; }); + # devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; }); + # formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt); + + # wallpapers = inherit wallpapers; #NOTE broken + + nixosConfigurations = { + # Main desktop + khad = lib.nixosSystem { + modules = [ + ./machines/khad + lix-module.nixosModules.default + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/home.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + ]; + }; + # Personal laptop + zenbook = lib.nixosSystem { + # specialArgs = { inherit inputs; }; + modules = [ + ./machines/zenbook + lix-module.nixosModules.default + + # hyprland.homeManagerModules.default {wayland.windowManager.hyprland.enable = true;} + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/home.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + # # Let 'nixos-version --json' know the Git revision of this flake. + # system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + # nix.registry.nixpkgs.flake = nixpkgs; + ]; + }; + + betsy = lib.nixosSystem { # work laptop + modules = [ + ./machines/betsy + # lix-module.nixosModules.default + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/home.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + ]; + }; + doretta = lib.nixosSystem { # build server + modules = [ + ./machines/doretta + lix-module.nixosModules.default + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/doretta.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + ]; + }; + bosco = lib.nixosSystem { # networking server + modules = [ + ./machines/bosco + # lix-module.nixosModules.default + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/default.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + + ./modules/nixos/headscale.nix + ]; + }; + picast = lib.nixosSystem { # anger at chromecast + modules = [ + ./machines/picast + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/default.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + ]; + }; + live = lib.nixosSystem { + modules = [ + (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") + ./machines/iso/configuration.nix + ./modules/users/defin.nix + ./modules/nixos/system-packages.nix + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.defin = import ./home-manager/default.nix; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + { nixpkgs.hostPlatform = "aarch64-linux"; } + ]; + }; + livetest = lib.nixosSystem { + modules = [ + (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") + { nixpkgs.hostPlatform = "aarch64-linux"; } + ]; + }; }; - picast = nixpkgs.lib.nixosSystem { - modules = [ - ./machines/picast/configuration.nix - - ./modules/nixos/nix-common.nix - ./modules/nixos/environment.nix - ./modules/nixos/tailscale.nix - ./modules/nixos/system-packages.nix - ./modules/users/defin.nix - ./modules/users/root.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/default.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - } - ]; + homeConfigurations = { #NOTE: no worky yet + # Standalone HM only + # Desktop + "defin@khad" = lib.homeManagerConfiguration { + modules = [ ./home-manager/home.nix ]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { inherit inputs outputs; }; + }; + # Laptop + "defin@nixos-zenbook" = lib.homeManagerConfiguration { + modules = [ ./home-manager/home.nix ]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { inherit inputs outputs; }; + }; }; - khad = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - ./machines/khad/configuration.nix - lix-module.nixosModules.default - - ./modules/users/defin.nix - ./modules/users/root.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.defin = import ./home-manager/home.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - } - ./modules/nixos/hyprland.nix - - ./modules/nixos/bluetooth.nix - ./modules/nixos/environment.nix - ./modules/nixos/kde-connect.nix - ./modules/nixos/nix-common.nix - ./modules/nixos/services.nix - ./modules/nixos/tailscale.nix - ./modules/nixos/steam.nix - # ./modules/nixos/sway.nix - ./modules/nixos/system-packages.nix - ]; - }; - }; }; } diff --git a/machines/betsy/configuration.nix b/machines/betsy/default.nix index cebf038..244db6a 100644 --- a/machines/betsy/configuration.nix +++ b/machines/betsy/default.nix @@ -8,6 +8,17 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + + ../../modules/nixos/bluetooth.nix + ../../modules/nixos/nix-common.nix + ../../modules/nixos/environment.nix + ../../modules/nixos/tailscale.nix + ../../modules/nixos/system-packages.nix + ../../modules/nixos/services.nix + + ../../modules/users/defin.nix + ../../modules/users/root.nix + ../../modules/users/jerry.nix ]; boot = { loader = { diff --git a/machines/bosco/configuration.nix b/machines/bosco/default.nix index df03703..25221b1 100644 --- a/machines/bosco/configuration.nix +++ b/machines/bosco/default.nix @@ -8,6 +8,14 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + + ../../modules/nixos/nix-common.nix + ../../modules/nixos/environment.nix + ../../modules/nixos/tailscale.nix + ../../modules/nixos/cgit.nix + ../../modules/nixos/system-packages.nix + ../../modules/users/defin.nix + ../../modules/users/root.nix ]; # Use the GRUB 2 boot loader. diff --git a/machines/doretta/configuration.nix b/machines/doretta/default.nix index 9640d7f..2b79a99 100644 --- a/machines/doretta/configuration.nix +++ b/machines/doretta/default.nix @@ -8,6 +8,15 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + + ../../modules/nixos/nix-common.nix + ../../modules/nixos/environment.nix + ../../modules/nixos/tailscale.nix + ../../modules/nixos/system-packages.nix + + ../../modules/users/defin.nix + ../../modules/users/git.nix + ../../modules/users/root.nix ]; # Use the systemd-boot EFI boot loader. diff --git a/machines/khad/configuration.nix b/machines/khad/default.nix index 2aa7d51..f41eab8 100644 --- a/machines/khad/configuration.nix +++ b/machines/khad/default.nix @@ -5,10 +5,25 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + + ../../modules/users/defin.nix + ../../modules/users/root.nix + + ../../modules/nixos/hyprland.nix + + ../../modules/nixos/bluetooth.nix + ../../modules/nixos/environment.nix + ../../modules/nixos/kde-connect.nix + ../../modules/nixos/nix-common.nix + ../../modules/nixos/services.nix + ../../modules/nixos/tailscale.nix + ../../modules/nixos/steam.nix + # ../../modules/nixos/sway.nix + ../../modules/nixos/system-packages.nix + ]; # Use the systemd-boot EFI boot loader. boot = { diff --git a/machines/picast/configuration.nix b/machines/picast/default.nix index 354d95b..e99a15b 100644 --- a/machines/picast/configuration.nix +++ b/machines/picast/default.nix @@ -8,6 +8,14 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + + ../../modules/nixos/nix-common.nix + ../../modules/nixos/environment.nix + ../../modules/nixos/tailscale.nix + ../../modules/nixos/cgit.nix + ../../modules/nixos/system-packages.nix + ../../modules/users/defin.nix + ../../modules/users/root.nix ]; # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) diff --git a/machines/zenbook/configuration.nix b/machines/zenbook/default.nix index a6d389f..c2077e2 100644 --- a/machines/zenbook/configuration.nix +++ b/machines/zenbook/default.nix @@ -7,6 +7,22 @@ { imports = [ ./hardware-configuration.nix + + ../../modules/users/defin.nix + ../../modules/users/root.nix + + ../../modules/nixos/hyprland.nix + + ../../modules/nixos/asus-numpad-touchpad.nix + ../../modules/nixos/bluetooth.nix + ../../modules/nixos/environment.nix + ../../modules/nixos/kde-connect.nix + ../../modules/nixos/nix-common.nix + ../../modules/nixos/services.nix + ../../modules/nixos/tailscale.nix + ../../modules/nixos/steam.nix + # ../..modules/nixos/sway.nix + ../../modules/nixos/system-packages.nix ]; # Use the systemd-boot EFI boot loader. @@ -27,7 +43,7 @@ nixpkgs = { # texlive.combined.scheme-medium; - system = "x84_64-linux"; + # system = "x84_64-linux"; config.allowUnfree = true; }; diff --git a/modules/nixos/system-packages.nix b/modules/nixos/system-packages.nix index 90ddc38..b8d25ec 100644 --- a/modules/nixos/system-packages.nix +++ b/modules/nixos/system-packages.nix @@ -20,7 +20,7 @@ fonts.packages = with pkgs; [ hack-font ]; - nixpkgs.config.permittedInsecurePackages = [ - "electron-25.9.0" - ]; + # nixpkgs.config.permittedInsecurePackages = [ + # "electron-25.9.0" + # ]; } |
