Refactored file structure to make more sense, made default.nixes less verbose
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
{
|
||||
host,
|
||||
nur,
|
||||
self,
|
||||
inputs,
|
||||
username,
|
||||
config,
|
||||
home-manager,
|
||||
...
|
||||
}: let
|
||||
desktop_modules =
|
||||
if (host == "onagesson")
|
||||
then [(import ./programs/steam.nix)]
|
||||
else [];
|
||||
in {
|
||||
imports =
|
||||
[(import ./programs/btop.nix)]
|
||||
++ [(import ./programs/yazi.nix)]
|
||||
++ [(import ./programs/kitty.nix)]
|
||||
++ [(import ./programs/fuzzel.nix)]
|
||||
++ [(import ./programs/eza.nix)]
|
||||
++ [(import ./programs/cava.nix)]
|
||||
++ [(import ./programs/bat.nix)]
|
||||
++ [(import ./programs/fzf.nix)]
|
||||
++ [(import ./programs/git.nix)]
|
||||
++ [(import ./programs/password-store.nix)]
|
||||
++ [(import ./programs/autojump.nix)]
|
||||
++ [(import ./programs/firefox.nix)]
|
||||
++ [(import ./environment/gtk.nix)]
|
||||
++ [(import ./environment/spicetify.nix)]
|
||||
++ [(import ./environment/starship.nix)]
|
||||
++ [(import ./environment/desktop_userpkgs.nix)]
|
||||
++ [(import ./environment/zshell.nix)]
|
||||
++ [(import ./waybar)]
|
||||
++ [(import ./hyprland)]
|
||||
++ [(import ./scripts)]
|
||||
++ [(import ./swaync/swaync.nix)]
|
||||
++ desktop_modules;
|
||||
}
|
||||
21
modules/home/environment/default.nix
Normal file
21
modules/home/environment/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
host,
|
||||
nur,
|
||||
nixvim,
|
||||
self,
|
||||
inputs,
|
||||
username,
|
||||
config,
|
||||
home-manager,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[(import ./gtk.nix)]
|
||||
++ [(import ./spicetify.nix)]
|
||||
++ [(import ./starship.nix)]
|
||||
++ [(import ./userpkgs.nix)]
|
||||
++ [(import ./zshell.nix)]
|
||||
++ [(import ./waybar)]
|
||||
++ [(import ./hyprland)]
|
||||
++ [(import ./swaync)];
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
nvim = inputs.nvim.packages."x86_64-linux".default;
|
||||
toilet = inputs.toilet.packages."x86_64-linux".default;
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
gtk3
|
||||
uhk-agent
|
||||
sqlite
|
||||
starship
|
||||
zathura
|
||||
imagemagick
|
||||
yt-dlp
|
||||
vlc
|
||||
speedtest-cli
|
||||
vesktop
|
||||
obs-studio
|
||||
neovide
|
||||
chromium
|
||||
zsh
|
||||
zsh-syntax-highlighting
|
||||
zsh-history-substring-search
|
||||
zsh-autosuggestions
|
||||
rustup
|
||||
libreoffice
|
||||
handbrake
|
||||
gtrash
|
||||
ripgrep
|
||||
nvim
|
||||
toilet
|
||||
python3
|
||||
];
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
host,
|
||||
...
|
||||
}: let
|
||||
nvim = inputs.nvim.packages."x86_64-linux".default;
|
||||
toilet = inputs.toilet.packages."x86_64-linux".default;
|
||||
desktop_pkgs =
|
||||
if (host == "oganesson")
|
||||
@@ -40,7 +39,6 @@ in {
|
||||
libreoffice
|
||||
gtrash
|
||||
ripgrep
|
||||
nvim
|
||||
toilet
|
||||
python3
|
||||
]
|
||||
55
modules/home/home-manager.nix
Normal file
55
modules/home/home-manager.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
host,
|
||||
pkgs,
|
||||
self,
|
||||
inputs,
|
||||
username,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
nur = config.nur;
|
||||
in {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = {inherit self inputs host username nur;};
|
||||
users.${username} = {
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
./programs
|
||||
./environment
|
||||
./scripts
|
||||
];
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
groups.persist = {};
|
||||
users = {
|
||||
root.initialPassword = "1234";
|
||||
${username} = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "1234";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = ["wheel" "persist" "libvirtd"];
|
||||
};
|
||||
};
|
||||
};
|
||||
security.sudo.extraConfig = ''
|
||||
${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild
|
||||
'';
|
||||
nix.settings.allowed-users = ["${username}"];
|
||||
}
|
||||
31
modules/home/programs/default.nix
Normal file
31
modules/home/programs/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
host,
|
||||
nur,
|
||||
nixvim,
|
||||
self,
|
||||
inputs,
|
||||
username,
|
||||
config,
|
||||
home-manager,
|
||||
...
|
||||
}: let
|
||||
desktop_modules =
|
||||
if (host == "onagesson")
|
||||
then [(import ./gaming)]
|
||||
else [];
|
||||
in {
|
||||
imports =
|
||||
[(import ./btop.nix)]
|
||||
++ [(import ./yazi.nix)]
|
||||
++ [(import ./kitty.nix)]
|
||||
++ [(import ./fuzzel.nix)]
|
||||
++ [(import ./eza.nix)]
|
||||
++ [(import ./cava.nix)]
|
||||
++ [(import ./bat.nix)]
|
||||
++ [(import ./fzf.nix)]
|
||||
++ [(import ./git.nix)]
|
||||
++ [(import ./password-store.nix)]
|
||||
++ [(import ./autojump.nix)]
|
||||
++ [(import ./firefox.nix)]
|
||||
++ desktop_modules;
|
||||
}
|
||||
7
modules/home/programs/gaming/default.nix
Normal file
7
modules/home/programs/gaming/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[(import ./steam.nix)]
|
||||
++ [(import ./gaming_pkgs.nix)];
|
||||
}
|
||||
7
modules/home/programs/gaming/gaming_pkgs.nix
Normal file
7
modules/home/programs/gaming/gaming_pkgs.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
snes9x-gtk
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user