diff --git a/.dir-locals.el b/.dir-locals.el deleted file mode 100644 index 6291cbe..0000000 --- a/.dir-locals.el +++ /dev/null @@ -1,4 +0,0 @@ -;;; Directory Local Variables -*- no-byte-compile: t -*- -;;; For more information see (info "(emacs) Directory Variables") - -((nil . ((compile-command . "home-manager build")))) diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..311d875 --- /dev/null +++ b/default.nix @@ -0,0 +1,22 @@ +{username, ...}: { + imports = [ + # Programs + ./programs/desktop/default.nix + ./programs/shell/default.nix + ./programs/emacs/default.nix + ./programs/firefox/default.nix + ./programs/obs/default.nix + # Services + ./services/email/work.nix # TODO combine again at some point + ./services/password-store/default.nix + # Additional Scripts + ./scripts/default.nix + ]; + programs.home-manager.enable = true; + nixpkgs.config.allowUnfree = true; + home = { + inherit username; + homeDirectory = "/home/${username}"; + stateVersion = "23.05"; + }; +} diff --git a/flake.nix b/flake.nix index 2040368..721efec 100644 --- a/flake.nix +++ b/flake.nix @@ -40,9 +40,10 @@ defaultExtraSpecialArgs = { system ? "x86_64-linux", hostname ? "Atlas", + username ? "pixelifytica", ... }: rec { - inherit hostname; + inherit hostname username; inherit (plasma-manager.packages.${system}) rc2nix; accentColourName = "base0D"; altAccentColourName = "base0C"; @@ -69,18 +70,11 @@ }; bookmarks = builtins.fromJSON (builtins.readFile ./bookmarks.json); }; - defaultModules = { - username ? "pixelifytica", - hostname ? "Atlas", - ... - }: [ + defaultModules = [ plasma-manager.homeManagerModules.plasma-manager base16.homeManagerModule - ./home/${hostname}.nix - ({lib, ...}: { - home = {inherit username;}; - scheme = "${tt-schemes}/base16/one-light.yaml"; - }) + {scheme = "${tt-schemes}/base16/one-light.yaml";} + ./default.nix ]; in { packages.x86_64-linux = {inherit (home-manager.packages.x86_64-linux) default;}; @@ -98,10 +92,7 @@ # Server "pixelifytica@Legion" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs {system = "x86_64-linux";}; - modules = defaultModules { - username = "pixelifytica"; - hostname = "Legion"; - }; + modules = defaultModules; extraSpecialArgs = defaultExtraSpecialArgs { system = "x86_64-linux"; hostname = "Legion"; @@ -110,10 +101,12 @@ # Personal "pixelifytica@Northstar" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs {system = "x86_64-linux";}; - modules = defaultModules { - username = "pixelifytica"; - hostname = "Northstar"; - }; + modules = + defaultModules + ++ [ + ./default.nix + {programs.plasma.configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true;} + ]; extraSpecialArgs = defaultExtraSpecialArgs { system = "x86_64-linux"; hostname = "Northstar"; @@ -121,10 +114,7 @@ }; "pixelifytica@Vanguard" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs {system = "x86_64-linux";}; - modules = defaultModules { - username = "pixelifytica"; - hostname = "Vanguard"; - }; + modules = defaultModules ++ [./personal.nix]; extraSpecialArgs = defaultExtraSpecialArgs { system = "x86_64-linux"; hostname = "Vanguard"; @@ -133,10 +123,7 @@ # Work "elitherl@Tone" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs {system = "x86_64-linux";}; - modules = defaultModules { - username = "elitherl"; - hostname = "Tone"; - }; + modules = defaultModules ++ [./work.nix]; extraSpecialArgs = defaultExtraSpecialArgs { system = "x86_64-linux"; hostname = "Tone"; @@ -144,10 +131,7 @@ }; "elitherl@Scorch" = home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs {system = "x86_64-linux";}; - modules = defaultModules { - username = "elitherl"; - hostname = "Scorch"; - }; + modules = defaultModules ++ [./work.nix]; extraSpecialArgs = defaultExtraSpecialArgs { system = "x86_64-linux"; hostname = "Scorch"; diff --git a/home/Legion.nix b/home/Legion.nix deleted file mode 100644 index 68d2dab..0000000 --- a/home/Legion.nix +++ /dev/null @@ -1 +0,0 @@ -{...}: {imports = [./default.nix];} diff --git a/home/Northstar.nix b/home/Northstar.nix deleted file mode 100644 index 3393008..0000000 --- a/home/Northstar.nix +++ /dev/null @@ -1,4 +0,0 @@ -{...}: { - imports = [./default.nix]; - programs.plasma.configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true; -} diff --git a/home/Scorch.nix b/home/Scorch.nix deleted file mode 100644 index 2d7aed4..0000000 --- a/home/Scorch.nix +++ /dev/null @@ -1 +0,0 @@ -{...}: {imports = [./work.nix];} diff --git a/home/Tone.nix b/home/Tone.nix deleted file mode 100644 index 2d7aed4..0000000 --- a/home/Tone.nix +++ /dev/null @@ -1 +0,0 @@ -{...}: {imports = [./work.nix];} diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index a6c6479..0000000 --- a/home/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{config, ...}: { - imports = [ - # Programs - ../programs/desktop/default.nix - ../programs/shell/default.nix - ../programs/emacs/default.nix - ../programs/firefox/default.nix - ../programs/obs/default.nix - # Services - ../services/email/work.nix # TODO combine again at some point - ../services/password-store/default.nix - # Additional Scripts - ../scripts/default.nix - ]; - programs.home-manager.enable = true; - nixpkgs.config.allowUnfree = true; - home = { - homeDirectory = "/home/${config.home.username}"; - stateVersion = "23.05"; - }; -} diff --git a/home/Vanguard.nix b/personal.nix similarity index 82% rename from home/Vanguard.nix rename to personal.nix index 97da112..b47ab9d 100644 --- a/home/Vanguard.nix +++ b/personal.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { imports = [ ./default.nix ../programs/games/default.nix diff --git a/home/ukaea-vpn.conf b/ukaea-vpn.conf similarity index 100% rename from home/ukaea-vpn.conf rename to ukaea-vpn.conf diff --git a/home/work.nix b/work.nix similarity index 100% rename from home/work.nix rename to work.nix