restructure home for desktop and server

This commit is contained in:
Adithya 2023-04-28 22:39:46 +05:30
parent f11a57bb33
commit ab100e1995
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
45 changed files with 83 additions and 54 deletions

View file

@ -28,8 +28,9 @@
outputs = { self, nixpkgs, home-manager, impermanence, lanzaboote, nixos-hardware, nixvim }@inputs: {
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
nixosConfigurations = {
nixosConfigurations = let user = (import ./secrets.nix).users; in {
Skipper = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
@ -45,7 +46,21 @@
./common
./hosts/skipper
./home
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.${user.primary.userName} = { pkgs, ... }: {
imports = [
impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim
./home/common
./home/desktop
];
};
};
}
];
};
Rico2 = nixpkgs.lib.nixosSystem {
@ -57,8 +72,23 @@
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
home-manager.nixosModules.home-manager
./common
./hosts/rico
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.${user.primary.userName} = { pkgs, ... }: {
imports = [
./home/common
./home/server
];
};
};
}
];
};
};

4
home/common/default.nix Normal file
View file

@ -0,0 +1,4 @@
{ ... }: {
imports = [ ./programs ./services ];
home.stateVersion = "23.05";
}

View file

@ -0,0 +1,23 @@
{ pkgs, ... }: {
imports = [
./bat.nix
./btop.nix
./direnv.nix
./exa.nix
./git.nix
./starship.nix
./zsh.nix
];
home.packages = with pkgs; [
lazydocker
ripgrep
];
programs = {
fzf.enable = true;
lazygit.enable = true;
ssh.enable = true;
zoxide.enable = true;
};
}

View file

@ -1,6 +1,6 @@
{ ... }:
let
user = (import ../../secrets.nix).users;
user = (import ../../../secrets.nix).users;
in
{
programs.git = {

View file

@ -0,0 +1 @@
{ ... }: { }

View file

@ -1,35 +0,0 @@
{ impermanence, nixvim, pkgs, ... }:
let
user = (import ../secrets.nix).users;
in
{
programs.fuse.userAllowOther = true;
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.${user.primary.userName} = { pkgs, ... }: {
imports = [
impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim
./gtk.nix
./persistence.nix
./wm
./programs
./services
];
xdg.enable = true;
xdg.mime.enable = true;
xdg.mimeApps.enable = true;
xdg.userDirs.enable = true;
xdg.desktopEntries."nixos-manual" = {
name = "NixOS Manual";
exec = "nixos-help";
noDisplay = true;
};
home.stateVersion = "23.05";
};
}

14
home/desktop/default.nix Normal file
View file

@ -0,0 +1,14 @@
{ ... }: {
imports = [ ./programs ./services ./wm ./gtk.nix ./persistence.nix ];
xdg.enable = true;
xdg.mime.enable = true;
xdg.mimeApps.enable = true;
xdg.userDirs.enable = true;
xdg.desktopEntries."nixos-manual" = {
name = "NixOS Manual";
exec = "nixos-help";
noDisplay = true;
};
}

View file

@ -2,6 +2,7 @@
home.persistence."/persist/home" = {
allowOther = true;
directories = [
".cache/aria2"
".cache/mesa_shader_cache"
".cache/mozilla"
".cache/nix"

View file

@ -7,6 +7,7 @@
max-connection-per-server = 8;
split = 8;
min-split-size = "1M";
file-allocation = "falloc";
};
};
}

View file

@ -1,23 +1,16 @@
{ pkgs, ... }: {
imports = [
./aria2.nix
./bat.nix
./btop.nix
./direnv.nix
./exa.nix
./files.nix
./firefox.nix
./git.nix
./github-cli.nix
./gnupg.nix
./kitty.nix
./mpv.nix
./nixvim.nix
./starship.nix
./tmux.nix
./virt-manager.nix
./yt-dlp.nix
./zsh.nix
];
home.packages = with pkgs; [
@ -28,9 +21,7 @@
gnome.eog
gnome.gnome-system-monitor
gnome3.gnome-disk-utility
lazydocker
pavucontrol
ripgrep
spotify-tui
wl-clipboard
xdg-utils
@ -40,11 +31,4 @@
yubikey-personalization
yubikey-personalization-gui
];
programs = {
fzf.enable = true;
lazygit.enable = true;
ssh.enable = true;
zoxide.enable = true;
};
}

3
home/server/default.nix Normal file
View file

@ -0,0 +1,3 @@
{ ... }: {
imports = [ ./programs ./services ];
}

View file

@ -0,0 +1 @@
{ ... }: { }

View file

@ -0,0 +1 @@
{ ... }: { }

View file

@ -7,6 +7,7 @@
programs = {
dconf.enable = true;
fuse.userAllowOther = true;
git.enable = true;
seahorse.enable = true;
xwayland.enable = true;