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:
parent
73db0c0906
commit
1abfec381a
|
@ -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
22
default.nix
Normal 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";
|
||||
};
|
||||
}
|
46
flake.nix
46
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";
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{...}: {imports = [./default.nix];}
|
|
@ -1,4 +0,0 @@
|
|||
{...}: {
|
||||
imports = [./default.nix];
|
||||
programs.plasma.configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{...}: {imports = [./work.nix];}
|
|
@ -1 +0,0 @@
|
|||
{...}: {imports = [./work.nix];}
|
|
@ -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";
|
||||
};
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./default.nix
|
||||
../programs/games/default.nix
|
Reference in a new issue