Restructure to allow for modularity and add home-manager with tmux and git
This commit is contained in:
parent
eff6860aa2
commit
59842a4ba4
9 changed files with 110 additions and 11 deletions
37
flake.lock
37
flake.lock
|
@ -1,5 +1,23 @@
|
|||
{
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1708968331,
|
||||
|
@ -16,6 +34,22 @@
|
|||
}
|
||||
},
|
||||
"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": {
|
||||
"lastModified": 1712026416,
|
||||
"narHash": "sha256-N/3VR/9e1NlN49p7kCiATiEY6Tzdo+CbrAG8kqCQKcI=",
|
||||
|
@ -31,8 +65,9 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"impermanence": "impermanence",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,16 +3,18 @@
|
|||
|
||||
inputs = {
|
||||
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 {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
impermanence.nixosModules.impermanence
|
||||
home-manager.nixosModules.home-manager
|
||||
./machines/workstation.nix
|
||||
./users/hu.nix
|
||||
./users/hu/user.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
./hardware/workstation.nix
|
||||
./persist/workstation.nix
|
||||
../wm/xmonad.nix
|
||||
../packages/sets/basic.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
@ -66,14 +67,7 @@
|
|||
|
||||
# Todo: Move these packages out in the correct files.
|
||||
environment.systemPackages = with pkgs; [
|
||||
fastfetch
|
||||
neovim
|
||||
firefox
|
||||
rofi
|
||||
wget
|
||||
unzip
|
||||
git
|
||||
tree
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
|
12
packages/sets/basic.nix
Normal file
12
packages/sets/basic.nix
Normal 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
13
packages/sets/x.nix
Normal 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
13
users/hu/packages/git.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "caem";
|
||||
userEmail = "caem@dirae.org";
|
||||
signing = {
|
||||
key = "D125101DC74D392FEFDFD54AF4F7229F8B860E9F";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
}
|
15
users/hu/packages/tmux.nix
Normal file
15
users/hu/packages/tmux.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -13,5 +13,16 @@
|
|||
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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../packages/sets/x.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xmobar
|
||||
flameshot
|
||||
|
|
Loading…
Reference in a new issue