cleanup and restructuring

This commit is contained in:
Rouven Seifert 2023-04-06 22:31:45 +02:00
parent 706220f980
commit 8b2ea66132
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
17 changed files with 85 additions and 97 deletions

View file

@ -26,11 +26,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1669854260, "lastModified": 1680308980,
"narHash": "sha256-Z8NAL3g4i5LAhxveNGJhrVDHxIBbUf1lVIy/Thr2RMU=", "narHash": "sha256-aUEHV0jk2qIFP3jlsWYWhBbm+w/N9gzH3e4I5DcdB5s=",
"owner": "lovesegfault", "owner": "lovesegfault",
"repo": "beautysh", "repo": "beautysh",
"rev": "d616eb8d9d05ee4fb33de9c5521d99c3f0695d52", "rev": "9845efc3ea3e86cc0d41465d720a47f521b2799c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -57,11 +57,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1678901627, "lastModified": 1680776469,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", "narHash": "sha256-3CXUDK/3q/kieWtdsYpDOBJw3Gw4Af6x+2EiSnIkNQw=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", "rev": "411e8764155aa9354dbcd6d5faaeb97e9e3dce24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -140,11 +140,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1680704389, "lastModified": 1680811741,
"narHash": "sha256-MWtk097S2e1NNvAkMhI/hViUGb/oRd1GhjMSeJzWHYo=", "narHash": "sha256-5xwGfqYaefn2JnPWqFsS9cda4ItFb26UR8pqKuGV+JU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "110f3fd6585c8b92d3bc2dbaabbd2c1a1f76de7a", "rev": "801a17194c426abe406c2ced47874855e64031e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -256,11 +256,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1680070330, "lastModified": 1680780295,
"narHash": "sha256-aoT2YZCd9LEtiEULFLIF0ykKydgE72X8gw/k9/pRS5I=", "narHash": "sha256-lpPh5EXqnAFyioHfiDxnyIH/gETjjp29p/YJ17MHNUE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "a6aa8174fa61e55bd7e62d35464d3092aefe0421", "rev": "148fee317058fad8159619e9d6ccc8c0aa6d0fce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -271,11 +271,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1680487167, "lastModified": 1680669251,
"narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=", "narHash": "sha256-AVNE+0u4HlI3v96KCXE9risH7NKqj0QDLLfSckYXIbA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "53dad94e874c9586e71decf82d972dfb640ef044", "rev": "9c8ff8b426a8b07b9e0a131ac3218740dc85ba1e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -376,11 +376,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1680694805, "lastModified": 1680789869,
"narHash": "sha256-gd5iBzK7nWHhnw8BZ23yJSPTIpJWdIs1TUcLqLQzeVE=", "narHash": "sha256-jaBMVG7lVrddtQhKSib/QxoTOGLud7u63GJq7Z+HAoI=",
"owner": "pta2002", "owner": "pta2002",
"repo": "nixvim", "repo": "nixvim",
"rev": "d40db46d7fa842db812b1f037200c70447801108", "rev": "f79dccdc2ea114ac2b5b2bd4d96d1a8311f442f8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -428,11 +428,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1678976941, "lastModified": 1680769543,
"narHash": "sha256-skNr08frCwN9NO+7I77MjOHHAw+L410/37JknNld+W4=", "narHash": "sha256-b+aLX7w2cVsHtTTs1wgKsYeNw3SKyMn9Qkb42RK5Yx8=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "32b1dbedfd77892a6e375737ef04d8efba634e9e", "rev": "bb9e597b33641a8df00f17334db55fa10981c94f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -479,11 +479,11 @@
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1678901627,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -496,11 +496,11 @@
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"lastModified": 1680629978, "lastModified": 1680810405,
"narHash": "sha256-2iVx5zqU2CpMgmtVadsHSkhkAsoxAWKQp6RQqt2OgQY=", "narHash": "sha256-LmI/4Yp/pOOoI4RxLRx9I90NBsiqdRLVOfbATKlgpkg=",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "835208db98a29431fa687c9506f4b43fe645ff65", "rev": "7abda952d0000b72d240fe1d41457b9288f0b6e5",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {

View file

@ -75,18 +75,15 @@
nixosConfigurations = { nixosConfigurations = {
thinkpad = nixpkgs.lib.nixosSystem { thinkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs.inputs = attrs; specialArgs = attrs;
modules = [ modules = [
./hosts/thinkpad ./hosts/thinkpad
./shared
./users/rouven ./users/rouven
nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.common-pc-laptop-ssd
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
{ {
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
home-manager.extraSpecialArgs = attrs; home-manager.extraSpecialArgs = attrs;
home-manager.users.rouven = { home-manager.users.rouven = {
imports = [ imports = [
@ -96,9 +93,6 @@
sops-nix.homeManagerModules.sops sops-nix.homeManagerModules.sops
nix-index-database.hmModules.nix-index nix-index-database.hmModules.nix-index
]; ];
config = {
colorScheme = nix-colors.colorSchemes.dracula;
};
}; };
} }
]; ];
@ -109,6 +103,7 @@
modules = [ modules = [
nixos-hardware.nixosModules.intel-nuc-8i7beh nixos-hardware.nixosModules.intel-nuc-8i7beh
./hosts/nuc ./hosts/nuc
./shared
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
]; ];
}; };

View file

@ -9,8 +9,6 @@
./modules/nextcloud ./modules/nextcloud
./modules/vaultwarden ./modules/vaultwarden
./modules/nginx ./modules/nginx
../../shared/vim.nix
../../shared/sops.nix
]; ];
boot = { boot = {
@ -22,7 +20,6 @@
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console = { console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
@ -50,7 +47,7 @@
# ../../keys/ssh/rouven-smartcard # ../../keys/ssh/rouven-smartcard
]; ];
system.stateVersion = "22.11"; # Did you read the comment? system.stateVersion = "22.11";
} }

View file

@ -51,13 +51,6 @@
swapDevices = swapDevices =
[{ device = "/dev/disk/by-uuid/fdedb47c-a370-4005-ac37-1c186e667de0"; }]; [{ device = "/dev/disk/by-uuid/fdedb47c-a370-4005-ac37-1c186e667de0"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,8 +1,7 @@
{ config, ... }: { config, ... }:
{ {
networking = { networking = {
hostName = "nuc"; # Define your hostname. hostName = "nuc";
hostId = "795a4952";
useNetworkd = true; useNetworkd = true;
}; };
systemd.network = { systemd.network = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, xdph, ... }:
{ {
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
@ -8,9 +8,6 @@
./modules/networks ./modules/networks
./modules/greetd ./modules/greetd
./modules/snapper ./modules/snapper
../../shared/vim.nix
../../shared/sops.nix
../../shared/gpg.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -75,7 +72,7 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = [ extraPortals = [
inputs.xdph.packages.x86_64-linux.default xdph.packages.x86_64-linux.default
]; ];
}; };

View file

@ -68,14 +68,6 @@
[{ device = "/dev/disk/by-uuid/1dd20f07-877c-4ee5-bef5-5e8c6ebe7927"; }]; [{ device = "/dev/disk/by-uuid/1dd20f07-877c-4ee5-bef5-5e8c6ebe7927"; }];
boot.resumeDevice = "/dev/disk/by-uuid/1dd20f07-877c-4ee5-bef5-5e8c6ebe7927"; boot.resumeDevice = "/dev/disk/by-uuid/1dd20f07-877c-4ee5-bef5-5e8c6ebe7927";
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -13,9 +13,6 @@
}; };
networking = { useNetworkd = true; networking = { useNetworkd = true;
hostName = "thinkpad"; hostName = "thinkpad";
hostId = "79353b92"; # Define your hostname.
firewall.allowedTCPPortRanges = [{ from = 1714; to = 1764; }]; # open ports for kde connect
firewall.allowedUDPPortRanges = [{ from = 1714; to = 1764; }];
wireless = { wireless = {
enable = true; enable = true;
userControlled.enable = true; userControlled.enable = true;

7
shared/caches.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }:
{
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
}

9
shared/default.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./caches.nix
./gpg.nix
./sops.nix
./vim.nix
];
}

View file

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;

View file

@ -1,22 +1,21 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[ ./accounts
./accounts ./foot
./foot ./fzf
./fzf ./git
./git ./gpg
./gpg ./hyprland
./hyprland ./neovim
./neovim ./qutebrowser
./qutebrowser ./sops
./sops ./spotify
./spotify ./ssh
./ssh ./tmux
./tmux ./vifm
./vifm ./theme
./theme ./zsh
./zsh ./packages.nix
./packages.nix ];
];
} }

View file

@ -16,7 +16,6 @@
bell = { bell = {
urgent = true; urgent = true;
notify = true; notify = true;
#command = "${pkgs.notify-desktop}/bin/notify-desktop a";
}; };
colors = colors =
let let

View file

@ -1,13 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ delta ];
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Rouven Seifert"; userName = "Rouven Seifert";
userEmail = "rouven@rfive.de"; userEmail = "rouven@rfive.de";
extraConfig = { extraConfig = {
core.pager = "delta"; core.pager = "${pkgs.delta}/bin/delta";
interactive.diffFilter = "delta --color-only"; interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
delta = { delta = {
navigate = true; navigate = true;
light = false; light = false;

View file

@ -1,13 +1,16 @@
{ config, ... }: { config, ... }:
let
git = "~/.ssh/git";
in
{ {
programs.ssh = { programs.ssh = rec {
enable = true; enable = true;
matchBlocks = { matchBlocks = {
"se-gitlab.inf.tu-dresden.de" = { "se-gitlab.inf.tu-dresden.de" = {
identityFile = "~/.ssh/git"; identityFile = git;
}; };
"github.com" = { "github.com" = {
identityFile = "~/.ssh/git"; identityFile = git;
}; };
"rfive.de" = { "rfive.de" = {
user = "debian"; user = "debian";
@ -16,10 +19,11 @@
hostname = "kaki.ifsr.de"; hostname = "kaki.ifsr.de";
user = "root"; user = "root";
}; };
"fsr" = { "ifsr" = {
hostname = "ifsr.de"; hostname = "ifsr.de";
user = "rouven.seifert"; user = "rouven.seifert";
}; };
"fsr" = matchBlocks."ifsr";
"quitte" = { "quitte" = {
hostname = "quitte.ifsr.de"; hostname = "quitte.ifsr.de";
user = "root"; user = "root";
@ -30,15 +34,15 @@
}; };
"git@rfive.de" = { "git@rfive.de" = {
match = "Host rfive.de User git"; match = "Host rfive.de User git";
identityFile = "~/.ssh/git"; identityFile = git;
}; };
"git@raspi" = { "git@raspi" = {
match = "Host raspi User git"; match = "Host raspi User git";
identityFile = "~/.ssh/git"; identityFile = git;
}; };
"git@ifsr.de" = { "git@ifsr.de" = {
match = "Host ifsr.de User git"; match = "Host ifsr.de User git";
identityFile = "~/.ssh/git"; identityFile = git;
}; };
}; };
extraConfig = '' extraConfig = ''

View file

@ -1,5 +1,7 @@
{ config, pkgs, ... }: { pkgs, nix-colors, ... }:
{ {
colorScheme = nix-colors.colorSchemes.dracula;
# theme hardcoded to dracula, too lazy to make all this base16 # theme hardcoded to dracula, too lazy to make all this base16
home.sessionVariables.GTK_THEME = "Dracula"; home.sessionVariables.GTK_THEME = "Dracula";
gtk = { gtk = {

View file

@ -48,7 +48,6 @@
localVariables = { localVariables = {
COMPLETION_WAITING_DOTS = "true"; COMPLETION_WAITING_DOTS = "true";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#00bbbb,bold"; ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#00bbbb,bold";
# ZSH_AUTOSUGGEST_STRATEGY="(history completion)";
}; };
initExtra = initExtra =