Flatten and remove some extra files

Move home/ files into flake.nix (for machine-specific) or just up a
level (for default, personal, and work config files)
This commit is contained in:
Evie Litherland-Smith 2024-06-22 16:08:44 +01:00
parent 73db0c0906
commit 1abfec381a
11 changed files with 38 additions and 68 deletions

View file

@ -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"))))

22
default.nix Normal file
View file

@ -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";
};
}

View file

@ -40,9 +40,10 @@
defaultExtraSpecialArgs = { defaultExtraSpecialArgs = {
system ? "x86_64-linux", system ? "x86_64-linux",
hostname ? "Atlas", hostname ? "Atlas",
username ? "pixelifytica",
... ...
}: rec { }: rec {
inherit hostname; inherit hostname username;
inherit (plasma-manager.packages.${system}) rc2nix; inherit (plasma-manager.packages.${system}) rc2nix;
accentColourName = "base0D"; accentColourName = "base0D";
altAccentColourName = "base0C"; altAccentColourName = "base0C";
@ -69,18 +70,11 @@
}; };
bookmarks = builtins.fromJSON (builtins.readFile ./bookmarks.json); bookmarks = builtins.fromJSON (builtins.readFile ./bookmarks.json);
}; };
defaultModules = { defaultModules = [
username ? "pixelifytica",
hostname ? "Atlas",
...
}: [
plasma-manager.homeManagerModules.plasma-manager plasma-manager.homeManagerModules.plasma-manager
base16.homeManagerModule base16.homeManagerModule
./home/${hostname}.nix {scheme = "${tt-schemes}/base16/one-light.yaml";}
({lib, ...}: { ./default.nix
home = {inherit username;};
scheme = "${tt-schemes}/base16/one-light.yaml";
})
]; ];
in { in {
packages.x86_64-linux = {inherit (home-manager.packages.x86_64-linux) default;}; packages.x86_64-linux = {inherit (home-manager.packages.x86_64-linux) default;};
@ -98,10 +92,7 @@
# Server # Server
"pixelifytica@Legion" = home-manager.lib.homeManagerConfiguration { "pixelifytica@Legion" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
modules = defaultModules { modules = defaultModules;
username = "pixelifytica";
hostname = "Legion";
};
extraSpecialArgs = defaultExtraSpecialArgs { extraSpecialArgs = defaultExtraSpecialArgs {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "Legion"; hostname = "Legion";
@ -110,10 +101,12 @@
# Personal # Personal
"pixelifytica@Northstar" = home-manager.lib.homeManagerConfiguration { "pixelifytica@Northstar" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
modules = defaultModules { modules =
username = "pixelifytica"; defaultModules
hostname = "Northstar"; ++ [
}; ./default.nix
{programs.plasma.configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true;}
];
extraSpecialArgs = defaultExtraSpecialArgs { extraSpecialArgs = defaultExtraSpecialArgs {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "Northstar"; hostname = "Northstar";
@ -121,10 +114,7 @@
}; };
"pixelifytica@Vanguard" = home-manager.lib.homeManagerConfiguration { "pixelifytica@Vanguard" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
modules = defaultModules { modules = defaultModules ++ [./personal.nix];
username = "pixelifytica";
hostname = "Vanguard";
};
extraSpecialArgs = defaultExtraSpecialArgs { extraSpecialArgs = defaultExtraSpecialArgs {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "Vanguard"; hostname = "Vanguard";
@ -133,10 +123,7 @@
# Work # Work
"elitherl@Tone" = home-manager.lib.homeManagerConfiguration { "elitherl@Tone" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
modules = defaultModules { modules = defaultModules ++ [./work.nix];
username = "elitherl";
hostname = "Tone";
};
extraSpecialArgs = defaultExtraSpecialArgs { extraSpecialArgs = defaultExtraSpecialArgs {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "Tone"; hostname = "Tone";
@ -144,10 +131,7 @@
}; };
"elitherl@Scorch" = home-manager.lib.homeManagerConfiguration { "elitherl@Scorch" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
modules = defaultModules { modules = defaultModules ++ [./work.nix];
username = "elitherl";
hostname = "Scorch";
};
extraSpecialArgs = defaultExtraSpecialArgs { extraSpecialArgs = defaultExtraSpecialArgs {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "Scorch"; hostname = "Scorch";

View file

@ -1 +0,0 @@
{...}: {imports = [./default.nix];}

View file

@ -1,4 +0,0 @@
{...}: {
imports = [./default.nix];
programs.plasma.configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true;
}

View file

@ -1 +0,0 @@
{...}: {imports = [./work.nix];}

View file

@ -1 +0,0 @@
{...}: {imports = [./work.nix];}

View file

@ -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";
};
}

View file

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
config,
pkgs,
...
}: {
imports = [ imports = [
./default.nix ./default.nix
../programs/games/default.nix ../programs/games/default.nix