diff options
author | sils <sils@sils.li> | 2023-05-04 18:17:38 +0200 |
---|---|---|
committer | sils <sils@sils.li> | 2023-05-04 18:17:38 +0200 |
commit | 4eaf76cf1e0af9ec7a630320bb7d4956041dd03e (patch) | |
tree | 4073ad033ef5f0939e76bb82a75847b34ca4bba9 | |
parent | Chore(flake): Update (diff) | |
download | nix-config-4eaf76cf1e0af9ec7a630320bb7d4956041dd03e.tar.gz nix-config-4eaf76cf1e0af9ec7a630320bb7d4956041dd03e.zip |
Structure(treewide): Use new structure with home-manager
home-manager enables great possibilities and is part of simplifying the structure of my config.
-rw-r--r-- | flake.nix | 17 | ||||
-rw-r--r-- | hosts/thinklappi/default.nix | 10 | ||||
-rw-r--r-- | sys/default.nix | 11 | ||||
-rw-r--r-- | sys/desktop/gnome/default.nix (renamed from desktop/gnome/default.nix) | 0 | ||||
-rw-r--r-- | sys/desktop/plasma/default.nix (renamed from desktop/plasma/default.nix) | 0 | ||||
-rw-r--r-- | sys/desktop/xfce/default.nix (renamed from desktop/xfce/default.nix) | 0 | ||||
-rw-r--r-- | sys/environment/default.nix (renamed from common/environment/default.nix) | 0 | ||||
-rw-r--r-- | sys/nix/default.nix (renamed from common/nix/default.nix) | 0 | ||||
-rw-r--r-- | sys/packages/default.nix (renamed from common/packages/default.nix) | 0 | ||||
-rw-r--r-- | sys/services/flatpak/default.nix (renamed from services/flatpak/default.nix) | 0 | ||||
-rw-r--r-- | sys/services/zsh/default.nix (renamed from services/zsh/default.nix) | 0 | ||||
-rw-r--r-- | sys/users/default.nix (renamed from common/users/default.nix) | 0 | ||||
-rw-r--r-- | users/default.nix | 7 | ||||
-rw-r--r-- | users/sils/default.nix | 14 | ||||
-rw-r--r-- | users/sils/packages/default.nix | 6 |
15 files changed, 53 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix index 3b08173..7e892be 100644 --- a/flake.nix +++ b/flake.nix @@ -12,11 +12,22 @@ nixpkgs, home-manager, ... - } @ attrs: { + } @ attrs: let + system = "86_64-linux"; + in { nixosConfigurations.thinklappi = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; specialArgs = attrs; - modules = [./hosts/thinklappi]; + modules = [ + ./hosts/thinklappi + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.sils = import ./users/sils; + home-manager.extraSpecialArgs = {inherit nixpkgs system;}; + } + ]; }; }; } diff --git a/hosts/thinklappi/default.nix b/hosts/thinklappi/default.nix index 8a2fe78..ba379a8 100644 --- a/hosts/thinklappi/default.nix +++ b/hosts/thinklappi/default.nix @@ -9,15 +9,7 @@ in { imports = [ ./basesystem.nix - ../../common/environment - ../../common/nix - ../../common/packages - ../../common/users - ../../services/zsh - ../../services/flatpak # Mainly for minecraft - - # Desktop Environment to use - ../../desktop/gnome + ../../sys ]; services = { diff --git a/sys/default.nix b/sys/default.nix new file mode 100644 index 0000000..5f4babf --- /dev/null +++ b/sys/default.nix @@ -0,0 +1,11 @@ +{...}: { + imports = [ + ./desktop/gnome + ./environment + ./nix + ./packages + ./services/flatpak + ./services/zsh + ./users + ]; +} diff --git a/desktop/gnome/default.nix b/sys/desktop/gnome/default.nix index dbeb0f6..dbeb0f6 100644 --- a/desktop/gnome/default.nix +++ b/sys/desktop/gnome/default.nix diff --git a/desktop/plasma/default.nix b/sys/desktop/plasma/default.nix index 4198029..4198029 100644 --- a/desktop/plasma/default.nix +++ b/sys/desktop/plasma/default.nix diff --git a/desktop/xfce/default.nix b/sys/desktop/xfce/default.nix index b0de71a..b0de71a 100644 --- a/desktop/xfce/default.nix +++ b/sys/desktop/xfce/default.nix diff --git a/common/environment/default.nix b/sys/environment/default.nix index 8f58641..8f58641 100644 --- a/common/environment/default.nix +++ b/sys/environment/default.nix diff --git a/common/nix/default.nix b/sys/nix/default.nix index 30f5b38..30f5b38 100644 --- a/common/nix/default.nix +++ b/sys/nix/default.nix diff --git a/common/packages/default.nix b/sys/packages/default.nix index db97b9b..db97b9b 100644 --- a/common/packages/default.nix +++ b/sys/packages/default.nix diff --git a/services/flatpak/default.nix b/sys/services/flatpak/default.nix index d1f4586..d1f4586 100644 --- a/services/flatpak/default.nix +++ b/sys/services/flatpak/default.nix diff --git a/services/zsh/default.nix b/sys/services/zsh/default.nix index b8349f9..b8349f9 100644 --- a/services/zsh/default.nix +++ b/sys/services/zsh/default.nix diff --git a/common/users/default.nix b/sys/users/default.nix index 7f1e7d2..7f1e7d2 100644 --- a/common/users/default.nix +++ b/sys/users/default.nix diff --git a/users/default.nix b/users/default.nix new file mode 100644 index 0000000..23d6e96 --- /dev/null +++ b/users/default.nix @@ -0,0 +1,7 @@ +{ + nixpkgs, + system, + ... +}: { + sils = import ./sils {inherit nixpkgs system;}; +} diff --git a/users/sils/default.nix b/users/sils/default.nix new file mode 100644 index 0000000..5240fa9 --- /dev/null +++ b/users/sils/default.nix @@ -0,0 +1,14 @@ +{ + pkgs, + system, + ... +}: { + imports = [./packages]; + + home = { + username = "sils"; + homeDirectory = "/home/sils"; + stateVersion = "23.05"; + }; + programs.home-manager.enable = true; +} diff --git a/users/sils/packages/default.nix b/users/sils/packages/default.nix new file mode 100644 index 0000000..103e978 --- /dev/null +++ b/users/sils/packages/default.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + home.packages = [ + pkgs.styx + pkgs.cmatrix + ]; +} |