Update to (somewhat?) dendritic pattern
Heavily inspired by https://github.com/Doc-Steve/dendritic-design-with-flake-parts. > Atomic commits? Never heard of them!
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
secrets/
|
||||
|
||||
|
Before Width: | Height: | Size: 8.5 MiB After Width: | Height: | Size: 8.5 MiB |
@@ -1,219 +0,0 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{ config
|
||||
, pkgs
|
||||
, inputs
|
||||
, hostname
|
||||
, username
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
|
||||
## Boot
|
||||
# Bootloader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/nvme0n1";
|
||||
configurationLimit = 10;
|
||||
};
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
## Network
|
||||
networking.hostName = hostname;
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
## Time/Language
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
## Nix
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
## Global packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
git
|
||||
cifs-utils # required for network mounting the NAS
|
||||
age
|
||||
rocmPackages.amdsmi
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
catppuccin.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
# Force electron apps to use wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extraCompatPackages = [
|
||||
pkgs.proton-ge-bin
|
||||
];
|
||||
protontricks = {
|
||||
enable = true;
|
||||
};
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
## User config
|
||||
# enable auto-login
|
||||
services.getty.autologinUser = username;
|
||||
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
## NAS Mount
|
||||
|
||||
fileSystems."/mnt/nas" = {
|
||||
device = "//duke.veltnet/smb-share";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"user,users"
|
||||
"uid=1000"
|
||||
"gid=100"
|
||||
#TODO: we should use age for this
|
||||
"credentials=/etc/nixos/secrets/nas-share.creds"
|
||||
];
|
||||
};
|
||||
|
||||
# required for zsh completion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
#TODO: move kanata config to module
|
||||
keyboards.remap-specials = {
|
||||
config = ''
|
||||
(deflocalkeys-linux
|
||||
ö 39
|
||||
)
|
||||
|
||||
(defsrc
|
||||
a s d j k l ö
|
||||
)
|
||||
|
||||
(defvar
|
||||
tap-time 200
|
||||
hold-time 200
|
||||
)
|
||||
|
||||
(defalias
|
||||
a (tap-hold $tap-time $hold-time a lmet)
|
||||
s (tap-hold $tap-time $hold-time s lctl)
|
||||
d (tap-hold $tap-time $hold-time d lsft)
|
||||
k (tap-hold $tap-time $hold-time k rsft)
|
||||
l (tap-hold $tap-time $hold-time l rctl)
|
||||
ö (tap-hold $tap-time $hold-time ö ralt)
|
||||
|
||||
activate (tap-dance $tap-time (j _ _ (layer-switch home-mods)))
|
||||
deactivate (tap-dance $tap-time (j _ _ (layer-switch base)))
|
||||
)
|
||||
|
||||
(deflayer base
|
||||
a s d @activate k l ö
|
||||
)
|
||||
|
||||
(deflayer home-mods
|
||||
@a @s @d @deactivate @k @l @ö
|
||||
)
|
||||
'';
|
||||
extraDefCfg = ''
|
||||
process-unmapped-keys yes
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nixseparatedebuginfod2.enable = true;
|
||||
|
||||
services.mullvad-vpn.enable = true;
|
||||
services.pipewire = {
|
||||
alsa.enable = true;
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
}
|
||||
219
flake.lock
generated
219
flake.lock
generated
@@ -1,5 +1,42 @@
|
||||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770165109,
|
||||
"narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "b027ee29d959fda4b60b57566d64c98a202e0feb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"assets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"path": "./assets",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "./assets",
|
||||
"type": "path"
|
||||
},
|
||||
"parent": []
|
||||
},
|
||||
"catppuccin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -21,7 +58,62 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1744478979,
|
||||
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-file": {
|
||||
"locked": {
|
||||
"lastModified": 1773224147,
|
||||
"narHash": "sha256-w9RQyKZSTfqoZPRzIf7H4qVHy2N6uFk1MUU+c1K4c40=",
|
||||
"owner": "vic",
|
||||
"repo": "flake-file",
|
||||
"rev": "97bd69ff570dddccd704077830446ec1ca3a6988",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "flake-file",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772408722,
|
||||
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
@@ -44,7 +136,7 @@
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
@@ -67,11 +159,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772985280,
|
||||
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
|
||||
"lastModified": 1773264488,
|
||||
"narHash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
|
||||
"rev": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -81,6 +173,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"import-tree": {
|
||||
"locked": {
|
||||
"lastModified": 1772999353,
|
||||
"narHash": "sha256-dPb0WxUhFaz6wuR3B6ysqFJpsu8txKDPZvS47AT2XLI=",
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"rev": "545a4df146fce44d155573e47f5a777985acf912",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
@@ -111,11 +218,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1773068389,
|
||||
"narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
|
||||
"lastModified": 1773375660,
|
||||
"narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
|
||||
"rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -125,14 +232,45 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1772328832,
|
||||
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1773282481,
|
||||
"narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fe416aaedd397cacb33a610b33d60ff2b431b127",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769049374,
|
||||
@@ -174,20 +312,60 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"assets": "assets",
|
||||
"catppuccin": "catppuccin",
|
||||
"flake-file": "flake-file",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixvim": "nixvim",
|
||||
"rust-overlay": "rust-overlay",
|
||||
"secrets": "secrets",
|
||||
"spicetify-nix": "spicetify-nix",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773457417,
|
||||
"narHash": "sha256-waABTSxPdbxml4BhcabHhyQF02Qnj27qRU4ard0mTQo=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "055977c30249484010750e03074c744dcdaa0d23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"path": "./secrets",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "./secrets",
|
||||
"type": "path"
|
||||
},
|
||||
"parent": []
|
||||
},
|
||||
"spicetify-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773161309,
|
||||
@@ -248,6 +426,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -255,11 +448,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772685307,
|
||||
"narHash": "sha256-5xthZHeqwBeXNhnRIlxnCuaZLky0SZ6vQsxtd+eqhTU=",
|
||||
"lastModified": 1773290160,
|
||||
"narHash": "sha256-u09eF4Oafi+OIbTtKe/EWil26q1glcTATiSA7dF1oCI=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "dc92d88524ee83308795bc90f6a9f1d965265aaa",
|
||||
"rev": "c7cb51b30960757ed9fb8eb28567b32585d0a688",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
90
flake.nix
90
flake.nix
@@ -1,58 +1,52 @@
|
||||
# DO-NOT-EDIT. This file was auto-generated using github:vic/flake-file.
|
||||
# Use `nix run .#write-flake` to regenerate it.
|
||||
{
|
||||
description = "Weckyy702's (hopefully nice) NixOS config";
|
||||
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
|
||||
|
||||
inputs = {
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs = {
|
||||
home-manager.follows = "home-manager";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
assets = {
|
||||
url = "path:./assets";
|
||||
flake = false;
|
||||
};
|
||||
catppuccin = {
|
||||
url = "github:catppuccin/nix/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-file.url = "github:vic/flake-file";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixvim.url = "github:nix-community/nixvim/nixos-25.11";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
secrets = {
|
||||
url = "path:./secrets";
|
||||
flake = false;
|
||||
};
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
catppuccin.url = "github:catppuccin/nix/release-25.11";
|
||||
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, catppuccin
|
||||
, nixvim
|
||||
, ...
|
||||
} @ inputs: {
|
||||
nixosConfigurations.keith =
|
||||
let
|
||||
hostname = "keith";
|
||||
username = "weckyy702";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit hostname;
|
||||
inherit username;
|
||||
};
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
home-manager.users.${username} = import ./home/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, modulesPath
|
||||
, username
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/0869e843-348d-47e3-b6a1-79ad814ff62b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home/${username}/Documents" = {
|
||||
device = "/dev/disk/by-uuid/2d6f2255-eca4-489b-9f0f-6c455cd394fc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
#TODO: add external hdd, nas, and ssd
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/40b22e5b-839d-4189-93e7-246407cc76c7"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = [ pkgs.rocmPackages.clr.icd ];
|
||||
|
||||
hardware.amdgpu = {
|
||||
initrd.enable = true;
|
||||
opencl.enable = true;
|
||||
};
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles.profiles = {
|
||||
p2p-nas = {
|
||||
connection = {
|
||||
id = "p2p-nas";
|
||||
type = "ethernet";
|
||||
interface-name = "enp1s0";
|
||||
autoconnect = true;
|
||||
};
|
||||
ipv6 = {
|
||||
method = "manual";
|
||||
addresses = "fd00:fa57::1/64";
|
||||
};
|
||||
ipv4.method = "disabled";
|
||||
ethernet.mtu = 9000;
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.extraHosts = ''
|
||||
fd00:fa57::2 duke.veltnet
|
||||
'';
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{ hostname
|
||||
, username
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
libnotify
|
||||
];
|
||||
|
||||
programs.borgmatic = {
|
||||
enable = true;
|
||||
package = pkgs.borgmatic;
|
||||
|
||||
backups.default = {
|
||||
location = {
|
||||
repositories = [
|
||||
{
|
||||
label = "duke";
|
||||
path = "ssh://borg@duke.veltnet:2222/home/borg/backups/${hostname}-${username}";
|
||||
}
|
||||
];
|
||||
excludeHomeManagerSymlinks = true;
|
||||
patterns = [
|
||||
#TODO: home.homeDirectory might be usable here
|
||||
"R /home/${username}/Documents"
|
||||
"R /home/${username}/.ssh"
|
||||
"- /home/${username}/Documents/SteamLibrary"
|
||||
"- /home/${username}/Documents/PrismLauncher instances"
|
||||
"- /home/${username}/Documents/.Trash-1000"
|
||||
"- /home/${username}/Documents/VMs/Data"
|
||||
"- **/node_modules"
|
||||
"- **/.git"
|
||||
"- **/.cache"
|
||||
"- **/*build"
|
||||
"- **/target"
|
||||
"- **/.venv"
|
||||
"- **/venv"
|
||||
"- **/.gradle"
|
||||
"- **/out"
|
||||
"- **/dist"
|
||||
"- **/.pio"
|
||||
];
|
||||
};
|
||||
retention.keepWeekly = 2;
|
||||
storage.extraConfig.ssh_command = "ssh -i /home/${username}/.ssh/id_ed25519_borg";
|
||||
#FIXME: consistency checks!!!
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.borgmatic = {
|
||||
Unit.Description = "Create a backup using borgmatic";
|
||||
Service.ExecStart = "${pkgs.borgmatic}/bin/borgmatic create --stats";
|
||||
};
|
||||
|
||||
systemd.user.timers.borgmatic = {
|
||||
Unit.Description = "Create weekly backups using borgmatic";
|
||||
Timer = {
|
||||
OnCalendar = "Weekly";
|
||||
Persistent = true;
|
||||
};
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
};
|
||||
}
|
||||
232
home/home.nix
232
home/home.nix
@@ -1,232 +0,0 @@
|
||||
top @ { config
|
||||
, pkgs
|
||||
, username
|
||||
, inputs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
./borgmatic.nix
|
||||
./ssh.nix
|
||||
# ./wlr-which-key.nix
|
||||
];
|
||||
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
mpv
|
||||
feh
|
||||
grim
|
||||
slurp
|
||||
xdg-user-dirs
|
||||
hyprpicker
|
||||
libqalculate
|
||||
btop-rocm
|
||||
xfce.thunar
|
||||
prismlauncher
|
||||
playerctl
|
||||
signal-desktop
|
||||
qbittorrent
|
||||
unzip
|
||||
file
|
||||
gnucash
|
||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
prusa-slicer
|
||||
gdb
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
home.pointerCursor =
|
||||
let
|
||||
size = 24;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.catppuccin-cursors.mochaMauve;
|
||||
name = "catppuccin-mocha-mauve-cursors";
|
||||
inherit size;
|
||||
|
||||
dotIcons.enable = true;
|
||||
gtk.enable = true;
|
||||
hyprcursor.enable = true;
|
||||
hyprcursor.size = size;
|
||||
};
|
||||
|
||||
catppuccin.enable = true;
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
colorScheme = "dark";
|
||||
font.name = "JetBrainsMono";
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "kvantum";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = (import ./hyprland/settings.nix) top;
|
||||
};
|
||||
|
||||
#TODO: GDB configuration
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
imports = [ ./nixvim ];
|
||||
};
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default.isDefault = true;
|
||||
};
|
||||
|
||||
programs.zathura.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
|
||||
programs.spicetify =
|
||||
let
|
||||
spkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
enabledExtensions = with spkgs.extensions; [
|
||||
fullAppDisplay
|
||||
shuffle
|
||||
aiBandBlocker
|
||||
];
|
||||
enabledCustomApps = with spkgs.apps; [
|
||||
newReleases
|
||||
];
|
||||
theme = spkgs.themes.catppuccin;
|
||||
colorScheme = "mocha";
|
||||
};
|
||||
|
||||
programs.vesktop.enable = true;
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
modes = [
|
||||
"combi"
|
||||
"drun"
|
||||
"calc"
|
||||
"ssh"
|
||||
];
|
||||
plugins = [
|
||||
pkgs.rofi-calc
|
||||
];
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# For automatic login
|
||||
profileExtra = ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||
exec hyprland
|
||||
fi
|
||||
'';
|
||||
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initContent = pkgs.lib.mkBefore ''
|
||||
date
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "p10k-config";
|
||||
src = ./p10k;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 10;
|
||||
};
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
#TODO: kitty config
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings.user = {
|
||||
email = "weckyy702@gmail.com";
|
||||
name = "Weckyy702";
|
||||
};
|
||||
#TODO: signing
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
# TODO: this should be done more cleanly
|
||||
wallpaper_path = ./hyprland/horizontal_16x9.png;
|
||||
in
|
||||
{
|
||||
preload = "${wallpaper_path}";
|
||||
wallpaper = [
|
||||
#TODO: this should be dynamic
|
||||
"DP-1,${wallpaper_path}"
|
||||
"HDMI-A-1,${wallpaper_path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.dunst.enable = true;
|
||||
|
||||
services.hyprpolkitagent.enable = true;
|
||||
|
||||
home.stateVersion = "25.11";
|
||||
}
|
||||
@@ -1,312 +0,0 @@
|
||||
|
||||
# #######################################################################################
|
||||
# AUTOGENERATED HYPRLAND CONFIG.
|
||||
# EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS.
|
||||
# #######################################################################################
|
||||
|
||||
autogenerated = 1 # remove this line to remove the warning
|
||||
|
||||
# This is an example Hyprland config file.
|
||||
# Refer to the wiki for more information.
|
||||
# https://wiki.hypr.land/Configuring/
|
||||
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
|
||||
# You can split this configuration into multiple files
|
||||
# Create your files separately and then link them to this file like this:
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
|
||||
################
|
||||
### MONITORS ###
|
||||
################
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = kitty
|
||||
$fileManager = dolphin
|
||||
$menu = wofi --show drun
|
||||
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
# exec-once = $terminal
|
||||
# exec-once = nm-applet &
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
#############################
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Environment-variables/
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
|
||||
|
||||
###################
|
||||
### PERMISSIONS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Permissions/
|
||||
# Please note permission changes here require a Hyprland restart and are not applied on-the-fly
|
||||
# for security reasons
|
||||
|
||||
# ecosystem {
|
||||
# enforce_permissions = 1
|
||||
# }
|
||||
|
||||
# permission = /usr/(bin|local/bin)/grim, screencopy, allow
|
||||
# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
|
||||
# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
|
||||
|
||||
|
||||
#####################
|
||||
### LOOK AND FEEL ###
|
||||
#####################
|
||||
|
||||
# Refer to https://wiki.hypr.land/Configuring/Variables/
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#general
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
|
||||
border_size = 2
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false
|
||||
|
||||
# Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
rounding = 10
|
||||
rounding_power = 2
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 1.0
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#blur
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
|
||||
vibrancy = 0.1696
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#animations
|
||||
animations {
|
||||
enabled = yes, please :)
|
||||
|
||||
# Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
|
||||
# NAME, X0, Y0, X1, Y1
|
||||
bezier = easeOutQuint, 0.23, 1, 0.32, 1
|
||||
bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
|
||||
bezier = linear, 0, 0, 1, 1
|
||||
bezier = almostLinear, 0.5, 0.5, 0.75, 1
|
||||
bezier = quick, 0.15, 0, 0.1, 1
|
||||
|
||||
# Default animations, see https://wiki.hypr.land/Configuring/Animations/
|
||||
# NAME, ONOFF, SPEED, CURVE, [STYLE]
|
||||
animation = global, 1, 10, default
|
||||
animation = border, 1, 5.39, easeOutQuint
|
||||
animation = windows, 1, 4.79, easeOutQuint
|
||||
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
|
||||
animation = windowsOut, 1, 1.49, linear, popin 87%
|
||||
animation = fadeIn, 1, 1.73, almostLinear
|
||||
animation = fadeOut, 1, 1.46, almostLinear
|
||||
animation = fade, 1, 3.03, quick
|
||||
animation = layers, 1, 3.81, easeOutQuint
|
||||
animation = layersIn, 1, 4, easeOutQuint, fade
|
||||
animation = layersOut, 1, 1.5, linear, fade
|
||||
animation = fadeLayersIn, 1, 1.79, almostLinear
|
||||
animation = fadeLayersOut, 1, 1.39, almostLinear
|
||||
animation = workspaces, 1, 1.94, almostLinear, fade
|
||||
animation = workspacesIn, 1, 1.21, almostLinear, fade
|
||||
animation = workspacesOut, 1, 1.94, almostLinear, fade
|
||||
animation = zoomFactor, 1, 7, quick
|
||||
}
|
||||
|
||||
# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
|
||||
# "Smart gaps" / "No gaps when only"
|
||||
# uncomment all if you wish to use that.
|
||||
# workspace = w[tv1], gapsout:0, gapsin:0
|
||||
# workspace = f[1], gapsout:0, gapsin:0
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:f[1]
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
|
||||
dwindle {
|
||||
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true # You probably want this
|
||||
}
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Master-Layout/ for more
|
||||
master {
|
||||
new_status = master
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#misc
|
||||
misc {
|
||||
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
|
||||
}
|
||||
|
||||
|
||||
#############
|
||||
### INPUT ###
|
||||
#############
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = de
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Gestures
|
||||
gesture = 3, horizontal, workspace
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
|
||||
device {
|
||||
name = epic-mouse-v1
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
|
||||
###################
|
||||
### KEYBINDINGS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, exec, $terminal
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
||||
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
##############################
|
||||
|
||||
# See https://wiki.hypr.land/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Example windowrule
|
||||
# windowrule = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrule = suppressevent maximize, class:.*
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||
@@ -1,85 +0,0 @@
|
||||
{ ... }: {
|
||||
"$mod" = "SUPER";
|
||||
"$browser" = "zen";
|
||||
"$term" = "kitty";
|
||||
|
||||
general = {
|
||||
border_size = 2;
|
||||
gaps_in = 0;
|
||||
gaps_out = 5;
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
snap = { };
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
exec-once = [
|
||||
"hyprctl setcursor catppuccin-mocha-mauve-cursors 24"
|
||||
];
|
||||
|
||||
bind =
|
||||
[
|
||||
"$mod, Q, exit"
|
||||
"$mod, Return, exec, $term"
|
||||
"$mod, D, exec, rofi -show drun -modes drun,calc"
|
||||
"$mod, F2, exec, $browser"
|
||||
"$mod, c, killactive"
|
||||
"$mod, f, fullscreen"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod+SHIFT, h, movewindow, l"
|
||||
"$mod+SHIFT, j, movewindow, d"
|
||||
"$mod+SHIFT, k, movewindow, u"
|
||||
"$mod+SHIFT, l, movewindow, r"
|
||||
", Print, exec, grim -g \"$(slurp)\" \"/home/weckyy702/Pictures/screenshots/$(date -Iseconds).png\""
|
||||
"$mod+SHIFT, s, exec, hyprlock"
|
||||
]
|
||||
++
|
||||
# Switch workspaces
|
||||
(map (i: "$mod, ${builtins.toString i}, workspace, ${builtins.toString i}") [ 1 2 3 4 5 6 7 8 9 ])
|
||||
++ (map (i: "$mod+SHIFT, ${builtins.toString i}, movetoworkspacesilent, ${builtins.toString i}") [ 1 2 3 4 5 6 7 8 9 ]);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl position 5+"
|
||||
", XF86AudioPrev, exec, playerctl position 5-"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
bindo = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
shadow.enabled = false;
|
||||
blur.enabled = true;
|
||||
active_opacity = 0.8;
|
||||
inactive_opacity = 0.8;
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
misc.disable_hyprland_logo = true;
|
||||
|
||||
cursor.inactive_timeout = 3;
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
ecosystem.no_donation_nag = true;
|
||||
}
|
||||
32
home/ssh.nix
32
home/ssh.nix
@@ -1,32 +0,0 @@
|
||||
{ ... }: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
"veltko.de" = {
|
||||
user = "weckyy702";
|
||||
port = 47213;
|
||||
};
|
||||
"duke.veltnet" = {
|
||||
user = "konstantin";
|
||||
};
|
||||
#TODO: beastie
|
||||
};
|
||||
};
|
||||
services.ssh-agent = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
22
modules/factory/autologin.nix
Normal file
22
modules/factory/autologin.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ inputs, ... }: {
|
||||
config.flake.factory.autologin = username: {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
];
|
||||
services.getty.autologinUser = username;
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.autologin
|
||||
];
|
||||
};
|
||||
|
||||
config.flake.modules.homeManager.autologin = {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
];
|
||||
|
||||
programs.zsh.profileExtra = ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||
exec hyprland
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/factory/flake-option.nix
Normal file
6
modules/factory/flake-option.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }: {
|
||||
options.flake.factory = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.unspecified;
|
||||
default = { };
|
||||
};
|
||||
}
|
||||
9
modules/factory/grub-boot.nix
Normal file
9
modules/factory/grub-boot.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
config.flake.factory.grub-boot = device: {
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
inherit device;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/factory/hyprpaper.nix
Normal file
19
modules/factory/hyprpaper.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config.flake.factory.hyprpaper =
|
||||
{ wallpaper_path
|
||||
, monitor_names
|
||||
,
|
||||
}: { config, ... }: {
|
||||
services.hyprpaper =
|
||||
/*
|
||||
TODO: assert that hyprland is enabled
|
||||
*/
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ wallpaper_path ];
|
||||
wallpaper = map (mon: "mon,${wallpaper_path}") monitor_names;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
36
modules/factory/mount-cifs.nix
Normal file
36
modules/factory/mount-cifs.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config.flake.factory.mount-cifs =
|
||||
{ host
|
||||
, resource
|
||||
, destination
|
||||
, credentials_path
|
||||
, UID
|
||||
, GID
|
||||
,
|
||||
}: {
|
||||
fileSystems."${destination}" = {
|
||||
device = "//${host}/${resource}";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
# automount
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"nofail"
|
||||
"soft"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.device-timeout=5s"
|
||||
"x-systemd.mount-timeout=5s"
|
||||
|
||||
# mount options
|
||||
"rw"
|
||||
"iocharset=utf8"
|
||||
|
||||
# user
|
||||
"uid=${UID}"
|
||||
"gid=${GID}"
|
||||
|
||||
"credentials=${credentials_path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
30
modules/factory/user.nix
Normal file
30
modules/factory/user.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ self, ... }: {
|
||||
config.flake.factory.user = username: isAdmin: {
|
||||
nixos."${username}" =
|
||||
{ lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
users.users."${username}" = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${username}";
|
||||
extraGroups = lib.optionals isAdmin [ "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
# required for zsh completion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
home-manager.users."${username}" = {
|
||||
imports = [
|
||||
self.modules.homeManager."${username}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeManager."${username}" = {
|
||||
home.username = "${username}";
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/hosts/keith/configuration.nix
Normal file
14
modules/hosts/keith/configuration.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.keith = {
|
||||
imports = with inputs.self.modules.nixos;
|
||||
with inputs.self.factory; [
|
||||
system-desktop
|
||||
(autologin "weckyy702")
|
||||
(grub-boot "/dev/nvme0n1")
|
||||
development-tools
|
||||
i18n-de
|
||||
|
||||
#TODO: moar aspects
|
||||
];
|
||||
};
|
||||
}
|
||||
12
modules/hosts/keith/filesystems.nix
Normal file
12
modules/hosts/keith/filesystems.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
flake.modules.nixos.keith = {
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/0869e843-348d-47e3-b6a1-79ad814ff62b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/40b22e5b-839d-4189-93e7-246407cc76c7"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
3
modules/hosts/keith/flake-parts.nix
Normal file
3
modules/hosts/keith/flake-parts.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{ inputs, ... }: {
|
||||
flake.nixosConfigurations = inputs.self.lib.mkNixos "x86_64-linux" "keith";
|
||||
}
|
||||
13
modules/hosts/keith/hardware.nix
Normal file
13
modules/hosts/keith/hardware.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.keith = { lib, ... }: {
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
amd-gpu
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
};
|
||||
}
|
||||
31
modules/hosts/keith/networking.nix
Normal file
31
modules/hosts/keith/networking.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
flake.modules.nixos.keith = {
|
||||
networking.hostName = "keith";
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
ensureProfiles.profiles = {
|
||||
p2p-nas = {
|
||||
connection = {
|
||||
id = "p2p-nas";
|
||||
type = "ethernet";
|
||||
interface-name = "enp1s0";
|
||||
autoconnect = true;
|
||||
};
|
||||
ipv6 = {
|
||||
method = "manual";
|
||||
addresses = "fd00:fa57::1/64";
|
||||
};
|
||||
ipv4.method = "disabled";
|
||||
ethernet.mtu = 9000;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.extraHosts = ''
|
||||
fd00:fa57::2 duke.veltnet
|
||||
'';
|
||||
|
||||
networking.firewall.enable = false;
|
||||
};
|
||||
}
|
||||
6
modules/hosts/keith/users/weckyy702/filesystems.nix
Normal file
6
modules/hosts/keith/users/weckyy702/filesystems.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
flake.modules.nixos.keith.fileSystems."/home/weckyy702/Documents" = {
|
||||
device = "/dev/disk/by-uuid/2d6f2255-eca4-489b-9f0f-6c455cd394fc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
}
|
||||
16
modules/hosts/keith/users/weckyy702/mount-nas.nix
Normal file
16
modules/hosts/keith/users/weckyy702/mount-nas.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.keith = { config, ... }: {
|
||||
age.secrets."nas-creds".file = "${inputs.secrets}/nas-creds.age";
|
||||
|
||||
imports = with inputs.self.factory; [
|
||||
(mount-cifs {
|
||||
host = "duke.veltnet";
|
||||
resource = "home";
|
||||
destination = "/home/weckyy702/duke";
|
||||
credentials_path = "${config.age.secrets.nas-creds.path}";
|
||||
UID = "weckyy702";
|
||||
GID = "users";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
25
modules/hosts/keith/users/weckyy702/weckyy702.nix
Normal file
25
modules/hosts/keith/users/weckyy702/weckyy702.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.keith = { config, ... }: {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
weckyy702
|
||||
steam
|
||||
];
|
||||
|
||||
home-manager.users.weckyy702 = { config, ... }: {
|
||||
imports = with inputs.self.modules.homeManager;
|
||||
with inputs.self.factory; [
|
||||
(hyprpaper {
|
||||
wallpaper_path = "${inputs.assets}/horizontal_16x9.png";
|
||||
monitor_names = [
|
||||
"DP-1"
|
||||
"HDMI-A-1"
|
||||
];
|
||||
})
|
||||
vesktop
|
||||
spicetify
|
||||
borgmatic
|
||||
qbittorrent
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/nix/assets.nix
Normal file
8
modules/nix/assets.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
flake-file.inputs = {
|
||||
assets = {
|
||||
url = "path:./assets";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/nix/flake-parts/flake-file.nix
Normal file
22
modules/nix/flake-parts/flake-file.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.flake-parts.flakeModules.modules
|
||||
inputs.flake-file.flakeModules.default
|
||||
];
|
||||
|
||||
flake-file.inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-file.url = "github:vic/flake-file";
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
};
|
||||
|
||||
flake-file.outputs = ''
|
||||
inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules)
|
||||
'';
|
||||
|
||||
systems = [
|
||||
# f Darwin >:(
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
}
|
||||
33
modules/nix/flake-parts/lib.nix
Normal file
33
modules/nix/flake-parts/lib.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ inputs
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
# Helper functions for creating system / home-manager configurations
|
||||
|
||||
options.flake.lib = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.unspecified;
|
||||
default = { };
|
||||
};
|
||||
|
||||
config.flake.lib = {
|
||||
mkNixos = system: name: {
|
||||
${name} = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.self.modules.nixos.${name}
|
||||
{ nixpkgs.hostPlatform = lib.mkDefault system; }
|
||||
{ nixpkgs.config.allowUnfree = true; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
mkHomeManager = system: name: {
|
||||
${name} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
inputs.self.modules.homeManager.${name}
|
||||
{ nixpkgs.config.allowUnfree = true; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/nix/tools/home-manager.nix
Normal file
23
modules/nix/tools/home-manager.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ inputs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
# Add home-manager input
|
||||
flake-file.inputs = {
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
imports = [ inputs.home-manager.flakeModules.home-manager ];
|
||||
|
||||
flake.modules.nixos.home-manager = {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
verbose = true;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
26
modules/nix/tools/secrets.nix
Normal file
26
modules/nix/tools/secrets.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
secrets = {
|
||||
url = "path:./secrets";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.nixos.secrets = { pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
];
|
||||
environment.systemPackages = [ inputs.agenix.packages.${pkgs.stdenv.hostPlatform.system}.default ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.secrets = { pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.agenix.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
}
|
||||
14
modules/programs/browser.nix
Normal file
14
modules/programs/browser.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.homeManager.browser = { pkgs, ... }: {
|
||||
home.packages = [
|
||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
};
|
||||
}
|
||||
7
modules/programs/btop.nix
Normal file
7
modules/programs/btop.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
flake.modules.homeManager.btop = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
];
|
||||
};
|
||||
}
|
||||
48
modules/programs/catppuccin.nix
Normal file
48
modules/programs/catppuccin.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
catppuccin.url = "github:catppuccin/nix/release-25.11";
|
||||
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake.modules.nixos.catppuccin = {
|
||||
imports = [
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.catppuccin
|
||||
];
|
||||
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
|
||||
flake.modules.homeManager.catppuccin = { pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
];
|
||||
|
||||
# Catppuccin cursor
|
||||
home.pointerCursor =
|
||||
let
|
||||
size = 24;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.catppuccin-cursors.mochaMauve;
|
||||
name = "catppuccin-mocha-mauve-cursors";
|
||||
inherit size;
|
||||
|
||||
dotIcons.enable = true;
|
||||
gtk.enable = true;
|
||||
hyprcursor.enable = true;
|
||||
hyprcursor.size = size;
|
||||
};
|
||||
|
||||
catppuccin.enable = true;
|
||||
# Required for QT apps to use the catppuccin colors
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "kvantum";
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/programs/cli-tools.nix
Normal file
9
modules/programs/cli-tools.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
flake.modules.nixos.cli-tools = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
htop
|
||||
vim
|
||||
];
|
||||
};
|
||||
}
|
||||
14
modules/programs/development-tools/development-tools.nix
Normal file
14
modules/programs/development-tools/development-tools.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.development-tools = { pkgs, ... }: {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
rust
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cmake
|
||||
gnumake
|
||||
clang
|
||||
gcc
|
||||
];
|
||||
};
|
||||
}
|
||||
18
modules/programs/development-tools/rust.nix
Normal file
18
modules/programs/development-tools/rust.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
flake.modules.nixos.rust = { pkgs, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
inputs.rust-overlay.overlays.default
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
rust-bin.stable.latest.default
|
||||
];
|
||||
};
|
||||
}
|
||||
9
modules/programs/direnv.nix
Normal file
9
modules/programs/direnv.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
flake.modules.homeManager.direnv = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/programs/fzf.nix
Normal file
8
modules/programs/fzf.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
flake.modules.homeManager.fzf = {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/programs/git.nix
Normal file
16
modules/programs/git.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
flake.modules.nixos.git = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.git ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.git = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings.user = {
|
||||
email = "weckyy702@gmail.com";
|
||||
name = "Weckyy702";
|
||||
};
|
||||
#TODO: signing
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/programs/gnupg.nix
Normal file
8
modules/programs/gnupg.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
flake.modules.nixos.gnupg = {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/programs/hyprland/hyprland.nix
Normal file
20
modules/programs/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.hyprland = {
|
||||
programs.hyprland.enable = true;
|
||||
# Force electron apps to use wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.hyprland
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.hyprland = { pkgs, ... }: {
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
services.hyprpolkitagent.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
hyprpicker
|
||||
];
|
||||
};
|
||||
}
|
||||
89
modules/programs/hyprland/settings.nix
Normal file
89
modules/programs/hyprland/settings.nix
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
flake.modules.homeManager.hyprland = {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$browser" = "zen";
|
||||
"$term" = "kitty";
|
||||
|
||||
general = {
|
||||
border_size = 2;
|
||||
gaps_in = 0;
|
||||
gaps_out = 5;
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
snap = { };
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
exec-once = [
|
||||
"hyprctl setcursor catppuccin-mocha-mauve-cursors 24"
|
||||
];
|
||||
|
||||
bind =
|
||||
[
|
||||
"$mod, Q, exit"
|
||||
"$mod, Return, exec, $term"
|
||||
"$mod, D, exec, rofi -show drun -modes drun,calc"
|
||||
"$mod, F2, exec, $browser"
|
||||
"$mod, c, killactive"
|
||||
"$mod, f, fullscreen"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod+SHIFT, h, movewindow, l"
|
||||
"$mod+SHIFT, j, movewindow, d"
|
||||
"$mod+SHIFT, k, movewindow, u"
|
||||
"$mod+SHIFT, l, movewindow, r"
|
||||
", Print, exec, grim -g \"$(slurp)\" \"/home/weckyy702/Pictures/screenshots/$(date -Iseconds).png\""
|
||||
"$mod+SHIFT, s, exec, hyprlock"
|
||||
]
|
||||
++
|
||||
# Switch workspaces
|
||||
(map (i: "$mod, ${builtins.toString i}, workspace, ${builtins.toString i}") [ 0 1 2 3 4 5 6 7 8 9 ])
|
||||
++ (map (i: "$mod+SHIFT, ${builtins.toString i}, movetoworkspacesilent, ${builtins.toString i}") [ 0 1 2 3 4 5 6 7 8 9 ]);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl position 5+"
|
||||
", XF86AudioPrev, exec, playerctl position 5-"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
];
|
||||
|
||||
bindo = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
shadow.enabled = false;
|
||||
blur.enabled = true;
|
||||
active_opacity = 0.8;
|
||||
inactive_opacity = 0.8;
|
||||
};
|
||||
|
||||
animations.enabled = false;
|
||||
|
||||
misc.disable_hyprland_logo = true;
|
||||
|
||||
cursor.inactive_timeout = 3;
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
ecosystem.no_donation_nag = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/programs/kitty/config.nix
Normal file
5
modules/programs/kitty/config.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
flake.modules.homeManager.kitty = {
|
||||
#TODO: kitty config
|
||||
};
|
||||
}
|
||||
14
modules/programs/kitty/kitty.nix
Normal file
14
modules/programs/kitty/kitty.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
flake.modules.homeManager.kitty = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 10;
|
||||
};
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
#TODO: kitty config
|
||||
};
|
||||
};
|
||||
}
|
||||
11
modules/programs/multimedia.nix
Normal file
11
modules/programs/multimedia.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
flake.modules.homeManager.multimedia = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
feh
|
||||
mpv
|
||||
playerctl
|
||||
file
|
||||
zathura
|
||||
];
|
||||
};
|
||||
}
|
||||
19
modules/programs/nixvim/nixvim.nix
Normal file
19
modules/programs/nixvim/nixvim.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
nixvim.url = "github:nix-community/nixvim/nixos-25.11";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake.modules.homeManager.nixvim = {
|
||||
imports = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
imports = [ ./_nixvim-config ];
|
||||
};
|
||||
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
};
|
||||
}
|
||||
7
modules/programs/qbittorrent.nix
Normal file
7
modules/programs/qbittorrent.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
flake.modules.homeManager.qbittorrent = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
qbittorrent
|
||||
];
|
||||
};
|
||||
}
|
||||
15
modules/programs/rofi.nix
Normal file
15
modules/programs/rofi.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
flake.modules.homeManager.rofi = { pkgs, ... }: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
modes = [
|
||||
"combi"
|
||||
"drun"
|
||||
"calc"
|
||||
];
|
||||
plugins = [
|
||||
pkgs.rofi-calc
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
30
modules/programs/spicetify.nix
Normal file
30
modules/programs/spicetify.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake.modules.homeManager.spicetify = { pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.spicetify =
|
||||
let
|
||||
spkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
enabledExtensions = with spkgs.extensions; [
|
||||
fullAppDisplay
|
||||
shuffle
|
||||
aiBandBlocker
|
||||
];
|
||||
enabledCustomApps = with spkgs.apps; [
|
||||
newReleases
|
||||
];
|
||||
theme = spkgs.themes.catppuccin;
|
||||
colorScheme = "mocha";
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/programs/steam.nix
Normal file
16
modules/programs/steam.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
flake.modules.nixos.steam = { pkgs, ... }: {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extraCompatPackages = [
|
||||
pkgs.proton-ge-bin
|
||||
];
|
||||
protontricks = {
|
||||
enable = true;
|
||||
};
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/programs/thunderbird.nix
Normal file
9
modules/programs/thunderbird.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
# might make this bad boy a factory later
|
||||
{
|
||||
flake.modules.homeManager.thunderbird = {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default.isDefault = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/programs/vesktop.nix
Normal file
5
modules/programs/vesktop.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
flake.modules.homeManager.vesktop = {
|
||||
programs.vesktop.enable = true;
|
||||
};
|
||||
}
|
||||
5
modules/programs/zathura.nix
Normal file
5
modules/programs/zathura.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
flake.modules.homeManager.zathura = {
|
||||
programs.zathura.enable = true;
|
||||
};
|
||||
}
|
||||
9
modules/programs/zoxide.nix
Normal file
9
modules/programs/zoxide.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
flake.modules.homeManager.zoxide = {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
53
modules/programs/zsh/zsh.nix
Normal file
53
modules/programs/zsh/zsh.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.zsh = {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.zsh = { pkgs, ... }: {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
fzf
|
||||
zoxide
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initContent = pkgs.lib.mkBefore ''
|
||||
date
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "p10k-config";
|
||||
src = ./p10k;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
67
modules/services/borgmatic.nix
Normal file
67
modules/services/borgmatic.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
flake.modules.homeManager.borgmatic =
|
||||
{ config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
hostname = config.networking.hostname;
|
||||
username = config.home.username;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
libnotify
|
||||
];
|
||||
|
||||
programs.borgmatic = {
|
||||
backups.default = {
|
||||
location = {
|
||||
repositories = [
|
||||
{
|
||||
label = "duke";
|
||||
path = "ssh://borg@duke.veltnet:2222/home/borg/backups/${hostname}-${username}";
|
||||
}
|
||||
];
|
||||
excludeHomeManagerSymlinks = true;
|
||||
patterns = [
|
||||
#TODO: home.homeDirectory might be usable here
|
||||
"R /home/${username}/Documents"
|
||||
"R /home/${username}/.ssh"
|
||||
"- /home/${username}/Documents/SteamLibrary"
|
||||
"- /home/${username}/Documents/PrismLauncher instances"
|
||||
"- /home/${username}/Documents/.Trash-1000"
|
||||
"- /home/${username}/Documents/VMs/Data"
|
||||
"- **/node_modules"
|
||||
"- **/.git"
|
||||
"- **/.cache"
|
||||
"- **/*build"
|
||||
"- **/target"
|
||||
"- **/.venv"
|
||||
"- **/venv"
|
||||
"- **/.gradle"
|
||||
"- **/out"
|
||||
"- **/dist"
|
||||
"- **/.pio"
|
||||
];
|
||||
};
|
||||
retention.keepWeekly = 2;
|
||||
storage.extraConfig.ssh_command = "ssh -i /home/${username}/.ssh/id_ed25519_borg";
|
||||
#FIXME: consistency checks!!!
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.borgmatic = {
|
||||
Unit.Description = "Create a backup using borgmatic";
|
||||
Service.ExecStart = "${pkgs.borgmatic}/bin/borgmatic create --stats";
|
||||
};
|
||||
|
||||
systemd.user.timers.borgmatic = {
|
||||
Unit.Description = "Create weekly backups using borgmatic";
|
||||
Timer = {
|
||||
OnCalendar = "Weekly";
|
||||
Persistent = true;
|
||||
};
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/services/debuginfo.nix
Normal file
5
modules/services/debuginfo.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
flake.modules.nixos.debuginfod = {
|
||||
services.nixseparatedebuginfod2.enable = true;
|
||||
};
|
||||
}
|
||||
47
modules/services/kanata.nix
Normal file
47
modules/services/kanata.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
flake.modules.nixos.kanata = {
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
#TODO: move kanata config to module
|
||||
keyboards.remap-specials = {
|
||||
config = ''
|
||||
(deflocalkeys-linux
|
||||
ö 39
|
||||
)
|
||||
|
||||
(defsrc
|
||||
a s d j k l ö
|
||||
)
|
||||
|
||||
(defvar
|
||||
tap-time 200
|
||||
hold-time 200
|
||||
)
|
||||
|
||||
(defalias
|
||||
a (tap-hold $tap-time $hold-time a lmet)
|
||||
s (tap-hold $tap-time $hold-time s lctl)
|
||||
d (tap-hold $tap-time $hold-time d lsft)
|
||||
k (tap-hold $tap-time $hold-time k rsft)
|
||||
l (tap-hold $tap-time $hold-time l rctl)
|
||||
ö (tap-hold $tap-time $hold-time ö ralt)
|
||||
|
||||
activate (tap-dance $tap-time (j _ _ (layer-switch home-mods)))
|
||||
deactivate (tap-dance $tap-time (j _ _ (layer-switch base)))
|
||||
)
|
||||
|
||||
(deflayer base
|
||||
a s d @activate k l ö
|
||||
)
|
||||
|
||||
(deflayer home-mods
|
||||
@a @s @d @deactivate @k @l @ö
|
||||
)
|
||||
'';
|
||||
extraDefCfg = ''
|
||||
process-unmapped-keys yes
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/services/mullvad.nix
Normal file
5
modules/services/mullvad.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
flake.modules.nixos.mullvad = {
|
||||
services.mullvad-vpn.enable = true;
|
||||
};
|
||||
}
|
||||
6
modules/services/openssh.nix
Normal file
6
modules/services/openssh.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
flake.modules.nixos.openssh = { lib, ... }: {
|
||||
services.openssh.enable = true;
|
||||
services.openssh.openFirewall = lib.mkDefault false;
|
||||
};
|
||||
}
|
||||
9
modules/services/pipewire.nix
Normal file
9
modules/services/pipewire.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
flake.modules.nixos.pipewire = {
|
||||
services.pipewire = {
|
||||
alsa.enable = true;
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/system-settings/amd-gpu.nix
Normal file
18
modules/system-settings/amd-gpu.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
flake.modules.nixos.amd-gpu = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
rocmPackages.amdsmi
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = [ pkgs.rocmPackages.clr.icd ];
|
||||
};
|
||||
hardware.amdgpu = {
|
||||
initrd.enable = true;
|
||||
opencl.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/system-settings/i18n-de.nix
Normal file
23
modules/system-settings/i18n-de.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
flake.modules.nixos.i18n-de = {
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
};
|
||||
}
|
||||
5
modules/system-settings/linux-latest.nix
Normal file
5
modules/system-settings/linux-latest.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
flake.modules.nixos.linux-latest = { pkgs, ... }: {
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
}
|
||||
11
modules/system-settings/nerdfonts.nix
Normal file
11
modules/system-settings/nerdfonts.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
flake.modules.nixos.nerdfonts = { pkgs, ... }: {
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
fontDir.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/system-types/base/homeManager.nix
Normal file
9
modules/system-types/base/homeManager.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.homeManager.system-base = { config, ... }: {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
];
|
||||
|
||||
home.homeDirectory = "/home/${config.home.username}";
|
||||
home.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
65
modules/system-types/base/nixos.nix
Normal file
65
modules/system-types/base/nixos.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
flake.modules.nixos.system-base = { pkgs, ... }: {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
home-manager
|
||||
secrets
|
||||
openssh
|
||||
linux-latest
|
||||
cli-tools
|
||||
zsh
|
||||
gnupg
|
||||
];
|
||||
|
||||
# Make unstable nixpkgs available as pkgs.unstable
|
||||
nixpkgs.overlays = [
|
||||
(final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (final) config;
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
};
|
||||
})
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
# high priority since it's almost always used
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://install.determinate.systems"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM"
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
# "allow-import-from-derivation"
|
||||
];
|
||||
|
||||
download-buffer-size = 1024 * 1024 * 1024;
|
||||
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
28
modules/system-types/desktop/desktop.nix
Normal file
28
modules/system-types/desktop/desktop.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.system-desktop = {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
system-base
|
||||
hyprland
|
||||
|
||||
#TODO: moar aspects
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.system-desktop
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.system-desktop = {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
system-base
|
||||
|
||||
rofi
|
||||
kitty
|
||||
|
||||
browser
|
||||
multimedia
|
||||
zsh
|
||||
thunderbird
|
||||
];
|
||||
};
|
||||
}
|
||||
29
modules/users/weckyy702/weckyy702.nix
Normal file
29
modules/users/weckyy702/weckyy702.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ inputs
|
||||
, self
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
flake.homeConfigurations = inputs.self.lib.mkHomeManager "x86_64-linux" "weckyy702";
|
||||
|
||||
flake.modules = lib.mkMerge [
|
||||
(self.factory.user "weckyy702" true)
|
||||
{
|
||||
nixos.weckyy702 = {
|
||||
imports = with self.modules.nixos; [
|
||||
kanata
|
||||
catppuccin
|
||||
];
|
||||
|
||||
users.users.weckyy702.extraGroups = [ "networkmanager" "dialout" ];
|
||||
};
|
||||
|
||||
homeManager.weckyy702 = { pkgs, ... }: {
|
||||
imports = with self.modules.homeManager; [
|
||||
nixvim
|
||||
btop
|
||||
#TODO: moar aspects
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
12
secrets/nas-creds.age
Normal file
12
secrets/nas-creds.age
Normal file
@@ -0,0 +1,12 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFNjTWNPZyB6Mzk1
|
||||
MWl5cW5uNkc0WTFUTEF1TGFOS0J3a1YyRzJieTlDOGVPbm84WVVNCjJUNlp5K3Ny
|
||||
YUhMdWp2Zk5tNGp1TkxKcnNST2h1N0VrVnNiaUZzV21QUFUKLT4gc3NoLWVkMjU1
|
||||
MTkgZkJwNFR3IDR5UFhoTkNOUlJyVmovMUQzTExGK2Y2bFZPMW9ZZFdQTFliUFVj
|
||||
WDRPM2cKSjFQVWhVZXFMY0ZzdDEraXdkeW1BVkRtemFQdHYzeUI4ZjhrNFdsdmo1
|
||||
WQotPiBzc2gtZWQyNTUxOSBZazBxSWcgOUJxQkMzYzFrYWhVOTVFTnNvVmI1WDBn
|
||||
U2ZCVDU0WTliQzRxTVZKdCtCdwpYbUlJVmNHaHpuY0dJMldJSEFkbmpkZTlmTkI1
|
||||
Y3lhQWRBaWdNOGpvcHdzCi0tLSA0dm04SEovSnZ5dW9MaTdxV1NSUGxnZ3orTzNy
|
||||
WUt6eUt6TFAyTGFhdWFVCs0loU4KFs/vYaJX4d31Gf1y8Fv/jWEIALZ4KIqbEPPf
|
||||
3C1Ljr2Mbfz231S/zxjfjK2vhHNtYdBtPOsEtpvThCZSTzuJ/WUzox5XUfL7
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
14
secrets/secrets.nix
Normal file
14
secrets/secrets.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
let
|
||||
weckyy702 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHlqOxre3cZWtTRaQWqn0zKjsnFZGCI4qdbpAeaQE2g";
|
||||
users = [ weckyy702 ];
|
||||
|
||||
keith = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKrauXP79zUm2FlVj3HRm+C8ufYAABiIoe68OCGbIm+2";
|
||||
tux = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFB7bh6ioZrTSR0AkKvJ1qxVWX0kwcM8yeHghTYFGpqZ";
|
||||
systems = [ keith tux ];
|
||||
in
|
||||
{
|
||||
"nas-creds.age" = {
|
||||
publicKeys = systems ++ users;
|
||||
armor = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user