From f59ea5524448b3b850d88cd5a17f762cad5f2012 Mon Sep 17 00:00:00 2001 From: Spectre Date: Sat, 8 Jun 2024 00:04:13 +0200 Subject: [PATCH] working --- flake.nix | 2 +- home/helix.nix | 1 - home/packages.nix | 4 ++-- hosts/lilith-pad/default.nix | 2 ++ system/default.nix | 8 +++----- system/nixpkgs.nix | 8 ++++++++ system/persistence.nix | 4 +++- system/sops.nix | 3 ++- system/stylix.nix | 4 +++- system/users.nix | 11 ----------- 10 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 system/nixpkgs.nix diff --git a/flake.nix b/flake.nix index 59c67ba6..044aa2ce 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ extraConfig = {}; }; - hosts = builtins.filter (host: builtins.pathExists ./hosts/${host}/configuration.nix) (builtins.attrNames (builtins.readDir ./hosts)); + hosts = builtins.filter (host: builtins.pathExists ./hosts/${host}/default.nix) (builtins.attrNames (builtins.readDir ./hosts)); importHostConf = host: lib.recursiveUpdate defaultConf (import ./hosts/${host} inputs diff --git a/home/helix.nix b/home/helix.nix index 3750a604..2c614493 100644 --- a/home/helix.nix +++ b/home/helix.nix @@ -7,7 +7,6 @@ enable = true; package = helix.packages.${pkgs.system}.default; settings = { - theme = "gruvbox_dark_hard"; editor = { line-number = "relative"; mouse = false; diff --git a/home/packages.nix b/home/packages.nix index 4d716530..bbef3da3 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -1,5 +1,5 @@ { - config, + system-config, pkgs, lib, ... @@ -32,5 +32,5 @@ lutris ]; in - common ++ (lib.optionals config.gaming.enable gaming); + common ++ (lib.optionals system-config.gaming.enable gaming); } diff --git a/hosts/lilith-pad/default.nix b/hosts/lilith-pad/default.nix index 5ef16d2f..bcd3d889 100644 --- a/hosts/lilith-pad/default.nix +++ b/hosts/lilith-pad/default.nix @@ -1,4 +1,6 @@ {...}: { + system = "x86_64-linux"; + extraConfig = { config.gaming.enable = false; }; diff --git a/system/default.nix b/system/default.nix index c8c05787..3d7af254 100644 --- a/system/default.nix +++ b/system/default.nix @@ -6,15 +6,12 @@ } @ inputs: let inherit (conf) system; - pkgs = import nixpkgs { - inherit (conf) system; - config.allowUnfree = true; - }; + pkgs = import ./nixpkgs.nix {inherit system nixpkgs;}; specialArgs = inputs; in { build = nixpkgs.lib.nixosSystem { - inherit system pkgs specialArgs; + inherit system specialArgs; modules = [ ./base.nix @@ -32,6 +29,7 @@ in { ./fonts.nix ./nix.nix ./users.nix + ./sops.nix ./ssh.nix ./steam.nix ./stylix.nix diff --git a/system/nixpkgs.nix b/system/nixpkgs.nix new file mode 100644 index 00000000..73c25d4d --- /dev/null +++ b/system/nixpkgs.nix @@ -0,0 +1,8 @@ +{ + nixpkgs, + system, +}: +import nixpkgs { + inherit system; + config.allowUnfree = true; +} diff --git a/system/persistence.nix b/system/persistence.nix index f860585b..4572a59c 100644 --- a/system/persistence.nix +++ b/system/persistence.nix @@ -1,4 +1,6 @@ -{conf, ...}: { +{impermanence, ...}: { + imports = [impermanence.nixosModule]; + environment.persistence."/persist/data" = { hideMounts = true; directories = [ diff --git a/system/sops.nix b/system/sops.nix index ea8f50d4..6924ad6c 100644 --- a/system/sops.nix +++ b/system/sops.nix @@ -1,2 +1,3 @@ -{...}: { +{sops-nix, ...}: { + imports = [sops-nix.nixosModules.sops]; } diff --git a/system/stylix.nix b/system/stylix.nix index 6c7e9df6..cbd9eb98 100644 --- a/system/stylix.nix +++ b/system/stylix.nix @@ -1,4 +1,6 @@ -{...}: { +{stylix, ...}: { + imports = [stylix.nixosModules.stylix]; + stylix.image = ../wallpapers/default.png; stylix.polarity = "dark"; } diff --git a/system/users.nix b/system/users.nix index f77588cc..271259fd 100644 --- a/system/users.nix +++ b/system/users.nix @@ -13,17 +13,6 @@ }; }; - home-manager = { - extraSpecialArgs = { - inherit inputs; - conf = conf; - config = config; - sops-nix = inputs.inputs.sops-nix; - }; - useGlobalPkgs = true; - useUserPackages = true; - }; - home-manager.users = let hm = import ../home; in {