From b8e127818a60e2b1cd92b63cc4b338c9a9fddd36 Mon Sep 17 00:00:00 2001 From: kiana-S Date: Thu, 6 Jan 2022 22:16:45 -0500 Subject: [PATCH] Add laptop config --- {config => common/config}/config.nix | 6 ----- {config => common/config}/default.nix | 0 {config => common/config}/login.nix | 0 {config => common/config}/packages.nix | 0 .../home-manager}/default.nix | 0 .../home-manager}/shell/alacritty.nix | 0 .../home-manager}/shell/default.nix | 0 .../home-manager}/shell/starship.nix | 0 ...What_Space_Really_Looks_Like_2880x1800.png | Bin .../home-manager}/wayland/default.nix | 0 .../home-manager}/wayland/mako.nix | 0 .../home-manager}/wayland/sway.nix | 0 .../home-manager}/wayland/swaylock.nix | 0 .../home-manager}/wayland/waybar.nix | 0 .../home-manager}/wayland/wofi.nix | 0 .../home-manager}/wayland/wofi/config | 0 .../home-manager}/wayland/wofi/style.css | 0 desktop/config/default.nix | 6 +++++ .../config}/hardware-configuration.nix | 0 desktop/home-manager/default.nix | 2 ++ flake.nix | 23 +++++++++++++++--- laptop/config/default.nix | 2 ++ laptop/home-manager/default.nix | 2 ++ 23 files changed, 32 insertions(+), 9 deletions(-) rename {config => common/config}/config.nix (95%) rename {config => common/config}/default.nix (100%) rename {config => common/config}/login.nix (100%) rename {config => common/config}/packages.nix (100%) rename {home-manager => common/home-manager}/default.nix (100%) rename {home-manager => common/home-manager}/shell/alacritty.nix (100%) rename {home-manager => common/home-manager}/shell/default.nix (100%) rename {home-manager => common/home-manager}/shell/starship.nix (100%) rename {home-manager => common/home-manager}/wayland/background/What_Space_Really_Looks_Like_2880x1800.png (100%) rename {home-manager => common/home-manager}/wayland/default.nix (100%) rename {home-manager => common/home-manager}/wayland/mako.nix (100%) rename {home-manager => common/home-manager}/wayland/sway.nix (100%) rename {home-manager => common/home-manager}/wayland/swaylock.nix (100%) rename {home-manager => common/home-manager}/wayland/waybar.nix (100%) rename {home-manager => common/home-manager}/wayland/wofi.nix (100%) rename {home-manager => common/home-manager}/wayland/wofi/config (100%) rename {home-manager => common/home-manager}/wayland/wofi/style.css (100%) create mode 100644 desktop/config/default.nix rename {config => desktop/config}/hardware-configuration.nix (100%) create mode 100644 desktop/home-manager/default.nix create mode 100644 laptop/config/default.nix create mode 100644 laptop/home-manager/default.nix diff --git a/config/config.nix b/common/config/config.nix similarity index 95% rename from config/config.nix rename to common/config/config.nix index 5f344e2..ce32757 100644 --- a/config/config.nix +++ b/common/config/config.nix @@ -3,11 +3,6 @@ nixpkgs, # The flake's input version of nixpkgs ... }: let hashedPassword = "$6$lokU/kizIJ/HwEI8$N6c80K0.VHkFBaOMcS8Bc1Fz5bx8qqTRH8brf0.duTOkf4Mja90bLwki8IVCBVpHnj7WqEkF4.CtZA6WczeqQ1"; in { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - nix.package = pkgs.nixFlakes; nix.extraOptions = '' experimental-features = nix-command flakes @@ -85,5 +80,4 @@ in { # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "21.11"; # Did you read the comment? - } diff --git a/config/default.nix b/common/config/default.nix similarity index 100% rename from config/default.nix rename to common/config/default.nix diff --git a/config/login.nix b/common/config/login.nix similarity index 100% rename from config/login.nix rename to common/config/login.nix diff --git a/config/packages.nix b/common/config/packages.nix similarity index 100% rename from config/packages.nix rename to common/config/packages.nix diff --git a/home-manager/default.nix b/common/home-manager/default.nix similarity index 100% rename from home-manager/default.nix rename to common/home-manager/default.nix diff --git a/home-manager/shell/alacritty.nix b/common/home-manager/shell/alacritty.nix similarity index 100% rename from home-manager/shell/alacritty.nix rename to common/home-manager/shell/alacritty.nix diff --git a/home-manager/shell/default.nix b/common/home-manager/shell/default.nix similarity index 100% rename from home-manager/shell/default.nix rename to common/home-manager/shell/default.nix diff --git a/home-manager/shell/starship.nix b/common/home-manager/shell/starship.nix similarity index 100% rename from home-manager/shell/starship.nix rename to common/home-manager/shell/starship.nix diff --git a/home-manager/wayland/background/What_Space_Really_Looks_Like_2880x1800.png b/common/home-manager/wayland/background/What_Space_Really_Looks_Like_2880x1800.png similarity index 100% rename from home-manager/wayland/background/What_Space_Really_Looks_Like_2880x1800.png rename to common/home-manager/wayland/background/What_Space_Really_Looks_Like_2880x1800.png diff --git a/home-manager/wayland/default.nix b/common/home-manager/wayland/default.nix similarity index 100% rename from home-manager/wayland/default.nix rename to common/home-manager/wayland/default.nix diff --git a/home-manager/wayland/mako.nix b/common/home-manager/wayland/mako.nix similarity index 100% rename from home-manager/wayland/mako.nix rename to common/home-manager/wayland/mako.nix diff --git a/home-manager/wayland/sway.nix b/common/home-manager/wayland/sway.nix similarity index 100% rename from home-manager/wayland/sway.nix rename to common/home-manager/wayland/sway.nix diff --git a/home-manager/wayland/swaylock.nix b/common/home-manager/wayland/swaylock.nix similarity index 100% rename from home-manager/wayland/swaylock.nix rename to common/home-manager/wayland/swaylock.nix diff --git a/home-manager/wayland/waybar.nix b/common/home-manager/wayland/waybar.nix similarity index 100% rename from home-manager/wayland/waybar.nix rename to common/home-manager/wayland/waybar.nix diff --git a/home-manager/wayland/wofi.nix b/common/home-manager/wayland/wofi.nix similarity index 100% rename from home-manager/wayland/wofi.nix rename to common/home-manager/wayland/wofi.nix diff --git a/home-manager/wayland/wofi/config b/common/home-manager/wayland/wofi/config similarity index 100% rename from home-manager/wayland/wofi/config rename to common/home-manager/wayland/wofi/config diff --git a/home-manager/wayland/wofi/style.css b/common/home-manager/wayland/wofi/style.css similarity index 100% rename from home-manager/wayland/wofi/style.css rename to common/home-manager/wayland/wofi/style.css diff --git a/desktop/config/default.nix b/desktop/config/default.nix new file mode 100644 index 0000000..a572ca4 --- /dev/null +++ b/desktop/config/default.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./hardware-configuration.nix + ]; +} diff --git a/config/hardware-configuration.nix b/desktop/config/hardware-configuration.nix similarity index 100% rename from config/hardware-configuration.nix rename to desktop/config/hardware-configuration.nix diff --git a/desktop/home-manager/default.nix b/desktop/home-manager/default.nix new file mode 100644 index 0000000..4b42ce7 --- /dev/null +++ b/desktop/home-manager/default.nix @@ -0,0 +1,2 @@ +{ ... }: +{} diff --git a/flake.nix b/flake.nix index bf42eed..ad280bb 100644 --- a/flake.nix +++ b/flake.nix @@ -19,20 +19,37 @@ outputs = { self, lib = nixpkgs.lib; in { nixosConfigurations = { - "kiana-pc" = lib.makeOverridable lib.nixosSystem { + "desktop" = lib.makeOverridable lib.nixosSystem { inherit system; modules = [ { _module.args = moduleArgs; } - ./config + ./common/config + ./desktop/config home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.kiana = import ./home-manager; + home-manager.users.${username} = import ./desktop/home-manager; home-manager.extraSpecialArgs = moduleArgs; } ]; }; + + "laptop" = lib.makeOverridable lib.nixosSystem { + inherit system; + modules = [ + { _module.args = moduleArgs } + ./common/config + ./laptop/config + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.${username} = import ./laptop/home-manager; + home-manager.extraSpecialArgs = moduleArgs; + } + ]; + }; }; }; } diff --git a/laptop/config/default.nix b/laptop/config/default.nix new file mode 100644 index 0000000..4b42ce7 --- /dev/null +++ b/laptop/config/default.nix @@ -0,0 +1,2 @@ +{ ... }: +{} diff --git a/laptop/home-manager/default.nix b/laptop/home-manager/default.nix new file mode 100644 index 0000000..4b42ce7 --- /dev/null +++ b/laptop/home-manager/default.nix @@ -0,0 +1,2 @@ +{ ... }: +{}