1
Fork 0

Restructure to allow for modularity and add home-manager with tmux and git

This commit is contained in:
caem 2024-04-04 13:49:19 +02:00
parent eff6860aa2
commit 59842a4ba4
No known key found for this signature in database
GPG key ID: F4F7229F8B860E9F
9 changed files with 110 additions and 11 deletions

View file

@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1712212014,
"narHash": "sha256-s+lbaf3nLRn1++/X2eXwY9mYCA/m9l8AvyG8beeOaXE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7e91f2a0ba4b62b88591279d54f741a13e36245b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": { "impermanence": {
"locked": { "locked": {
"lastModified": 1708968331, "lastModified": 1708968331,
@ -16,6 +34,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1712026416, "lastModified": 1712026416,
"narHash": "sha256-N/3VR/9e1NlN49p7kCiATiEY6Tzdo+CbrAG8kqCQKcI=", "narHash": "sha256-N/3VR/9e1NlN49p7kCiATiEY6Tzdo+CbrAG8kqCQKcI=",
@ -31,8 +65,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager",
"impermanence": "impermanence", "impermanence": "impermanence",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
} }
} }
}, },

View file

@ -3,16 +3,18 @@
inputs = { inputs = {
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
home-manager.url = "github:nix-community/home-manager";
}; };
outputs = { self, nixpkgs, impermanence, ... }: outputs = { self, nixpkgs, impermanence, home-manager, ... }:
{ {
nixosConfigurations.workstation = nixpkgs.lib.nixosSystem { nixosConfigurations.workstation = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
home-manager.nixosModules.home-manager
./machines/workstation.nix ./machines/workstation.nix
./users/hu.nix ./users/hu/user.nix
]; ];
}; };
}; };

View file

@ -5,6 +5,7 @@
./hardware/workstation.nix ./hardware/workstation.nix
./persist/workstation.nix ./persist/workstation.nix
../wm/xmonad.nix ../wm/xmonad.nix
../packages/sets/basic.nix
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -66,14 +67,7 @@
# Todo: Move these packages out in the correct files. # Todo: Move these packages out in the correct files.
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
fastfetch
neovim neovim
firefox
rofi
wget
unzip
git
tree
]; ];
system.stateVersion = "23.11"; system.stateVersion = "23.11";

12
packages/sets/basic.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
fastfetch
wget
unzip
git
tree
dos2unix
];
}

13
packages/sets/x.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
firefox
xdotool
xorg.xkill
xorg.xinput
xclip
yt-dlp
ffmpeg
];
}

13
users/hu/packages/git.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
programs.git = {
enable = true;
userName = "caem";
userEmail = "caem@dirae.org";
signing = {
key = "D125101DC74D392FEFDFD54AF4F7229F8B860E9F";
signByDefault = true;
};
};
}

View file

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
prefix = "C-Space";
customPaneNavigationAndResize = true;
baseIndex = 1;
extraConfig = ''
bind v split-window -v
bind c split-window -h
bind n new-window
'';
};
}

View file

@ -13,5 +13,16 @@
hashedPasswordFile = "/nix/config/secrets/hu/pass"; hashedPasswordFile = "/nix/config/secrets/hu/pass";
}; };
# Todo: home-manager configuration home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = false;
home-manager.users.hu = { pkgs, ... }: {
home.username = "hu";
home.homeDirectory = "/home/hu";
home.stateVersion = config.system.stateVersion;
imports = [
./packages/git.nix
./packages/tmux.nix
];
};
} }

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [
../packages/sets/x.nix
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xmobar xmobar
flameshot flameshot