Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95fe2dbc97
|
@@ -1,2 +0,0 @@
|
||||
# nixfmt reformat
|
||||
2231d2fc3fb4dc140c5f3257523dcdb513ac4dea
|
||||
@@ -8,7 +8,3 @@ result-*
|
||||
|
||||
# vim
|
||||
*.swp
|
||||
|
||||
# devenv
|
||||
.devenv*
|
||||
devenv.local.nix
|
||||
|
||||
@@ -6,20 +6,20 @@ My personal NixOS configurations.
|
||||
|
||||
```bash
|
||||
.
|
||||
├── flake.nix # hosts and home-manager wiring
|
||||
├── flake.lock
|
||||
├── flake.nix # flake definition
|
||||
├── hosts
|
||||
│ ├── argon # desktop
|
||||
│ ├── neon # laptop
|
||||
│ └── default # test vm
|
||||
│ ├── configuration.nix # host-specific settings and module imports
|
||||
│ ├── hardware-configuration.nix # generated by nixos-generate-config
|
||||
│ └── niri.nix # host-specific niri settings (outputs, input)
|
||||
│ └── neon
|
||||
│ ├── configuration.nix # import nix-modules for specific host
|
||||
│ └── hardware-configuration.nix # hardware configs for specific host
|
||||
├── modules
|
||||
│ ├── home-manager # user modules, imported by users/aaron/home.nix
|
||||
│ └── nixos # system modules, imported by the hosts
|
||||
│ ├── home-manager
|
||||
│ │ ├── xyz_module.nix
|
||||
│ └── nixos
|
||||
│ └── xyz_module.nix
|
||||
└── users
|
||||
└── aaron
|
||||
└── home.nix # imports home-manager modules
|
||||
└── home.nix # import home-manager modules for specific user
|
||||
```
|
||||
|
||||
## installation
|
||||
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"devenv": {
|
||||
"locked": {
|
||||
"dir": "src/modules",
|
||||
"lastModified": 1790701375,
|
||||
"narHash": "sha256-0FpLHIRDYiyo3EMTnMQSobZQknZaa3JuWo6vmMCK76o=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "fe20b5cba7ab5e93ae73f956a8d3efc50e1753f4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "src/modules",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"inputs": {
|
||||
"nixpkgs-src": "nixpkgs-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789506231,
|
||||
"narHash": "sha256-vNkJbtmqyBfFhn/HnzQo4ROuoyYWuy/allqTfJb4kMY=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv-nixpkgs",
|
||||
"rev": "c2f38fe7f9e04d9aadd354d380f2bd40531d9737",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"ref": "rolling",
|
||||
"repo": "devenv-nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1789370336,
|
||||
"narHash": "sha256-6RSEDHIWQtesQKWSu5qRai8L2h4KgCgMEfJHstW99G4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c7def046b9a883d46974757852106483d741586f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devenv": "devenv",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
packages = with pkgs; [
|
||||
# gitea (git.0x29a.ch)
|
||||
tea
|
||||
# nix tooling
|
||||
nixfmt # official formatter (RFC 166 style)
|
||||
statix # lints for nix anti-patterns
|
||||
deadnix # finds unused bindings and arguments
|
||||
nixd # language server
|
||||
nvd # diff system generations
|
||||
];
|
||||
|
||||
scripts = {
|
||||
lint.exec = ''
|
||||
set -e
|
||||
statix check .
|
||||
deadnix --fail --exclude hosts/*/hardware-configuration.nix -- .
|
||||
'';
|
||||
fmt.exec = ''
|
||||
nixfmt $(git ls-files '*.nix')
|
||||
'';
|
||||
};
|
||||
|
||||
enterShell = ''
|
||||
echo "nixconfig devenv: tea, lint, fmt"
|
||||
'';
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
inputs:
|
||||
nixpkgs:
|
||||
url: github:cachix/devenv-nixpkgs/rolling
|
||||
Generated
+15
-16
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788450739,
|
||||
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
|
||||
"lastModified": 1782949081,
|
||||
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
|
||||
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -28,11 +28,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1790819692,
|
||||
"narHash": "sha256-rvubAPbh3QCliic3sAK+CXTrPCGgJstY52OTs/5H1J4=",
|
||||
"lastModified": 1783823409,
|
||||
"narHash": "sha256-OI4IkRjRXa1e7hYmCGJDPDq5H/kPwhsyoS80cNUF9fI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c8ecc29e5175452bee4a2aa1ba2383856d795338",
|
||||
"rev": "7566825d4652a1b885bd4ce65bd9e8def432fec9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,11 +43,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1790689126,
|
||||
"narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=",
|
||||
"lastModified": 1783776592,
|
||||
"narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b4fd65b198c599cbe814fcb9f42d25d021595ec9",
|
||||
"rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -66,11 +66,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1790541651,
|
||||
"narHash": "sha256-/496IQz8qNWHHLnc3Zvr0l4uxJ34igNhJhn7ZKAefFk=",
|
||||
"lastModified": 1783647864,
|
||||
"narHash": "sha256-gtVkWD4SbsvQQ8aSFEsrUTxxyuim4/ZC6lBJmA+sE/k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "5980a626794486abad69fca7667f9c11dfbc3bd7",
|
||||
"rev": "ebffdb62cd1604537ee51d4d23258c002f1c90f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -86,11 +86,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1790718664,
|
||||
"narHash": "sha256-LWil4xgSyqIFZ9sydvL1glFOoiqAOknWUwykC4sqxuY=",
|
||||
"lastModified": 1783830881,
|
||||
"narHash": "sha256-V75/tqvYElVWyXnFf+0jh89wMh5a/cbV5YYe/P7RFDM=",
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-shell",
|
||||
"rev": "fd9759c892fe5034b682c185695f1bee121cd5b3",
|
||||
"rev": "ed3cb98536eaec92c2b523ddf703e1dc6728f535",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -108,7 +108,6 @@
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1774449309,
|
||||
"narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
|
||||
|
||||
@@ -17,41 +17,29 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nixvim,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
mkHost =
|
||||
hostName:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/${hostName}/hardware-configuration.nix
|
||||
./hosts/${hostName}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupCommand = "mv -f {file} {file}.hm-bak-$(date +%Y%m%d%H%M%S)";
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.aaron.imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
./users/aaron/home.nix
|
||||
];
|
||||
}
|
||||
outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs:
|
||||
let
|
||||
mkHost = hostName: nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/${hostName}/hardware-configuration.nix
|
||||
./hosts/${hostName}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.aaron.imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
./users/aaron/home.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
default = mkHost "default";
|
||||
neon = mkHost "neon";
|
||||
argon = mkHost "argon";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
default = mkHost "default";
|
||||
neon = mkHost "neon";
|
||||
argon = mkHost "argon";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
# argon: desktop with an amd gpu and three luks-encrypted data drives.
|
||||
# The drives are unlocked in the initrd with keyfiles from /etc/nixos/keys.
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# luks name -> partition uuid, mounted at /mnt/<name>
|
||||
drives = {
|
||||
data1 = "dfae62cc-bad1-4879-bf9a-461bde833625";
|
||||
data2 = "8312edae-9247-481b-a313-52a7f848f027";
|
||||
nvmecache = "2352250e-4ebe-4f9a-bf66-0d4aaa961bd8";
|
||||
};
|
||||
key = name: "/etc/nixos/keys/${name}.key";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixos/appimage.nix
|
||||
../../modules/nixos/astro.nix
|
||||
../../modules/nixos/audio.nix
|
||||
../../modules/nixos/bootloader.nix
|
||||
../../modules/nixos/calibre.nix
|
||||
../../modules/nixos/certificates.nix
|
||||
../../modules/nixos/claudecode.nix
|
||||
../../modules/nixos/drives.nix
|
||||
../../modules/nixos/gnupg.nix
|
||||
../../modules/nixos/gnuradio.nix
|
||||
../../modules/nixos/graphics.nix
|
||||
../../modules/nixos/greetd.nix
|
||||
../../modules/nixos/locales.nix
|
||||
../../modules/nixos/networking.nix
|
||||
@@ -33,39 +25,12 @@ in
|
||||
../../modules/nixos/steam.nix
|
||||
../../modules/nixos/thunar.nix
|
||||
../../modules/nixos/users.nix
|
||||
../../modules/nixos/vial.nix
|
||||
];
|
||||
|
||||
# host-specific niri config (outputs, input devices)
|
||||
home-manager.users.aaron.imports = [ ./niri.nix ];
|
||||
|
||||
# amd gpu: mesa/vulkan, and amdgpu in the initrd for plymouth
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
hardware.amdgpu.initrd.enable = true;
|
||||
|
||||
# encrypted data drives
|
||||
boot.initrd.secrets = lib.mapAttrs' (name: _: lib.nameValuePair (key name) (key name)) drives;
|
||||
boot.initrd.luks.devices = lib.mapAttrs (name: uuid: {
|
||||
device = "/dev/disk/by-uuid/${uuid}";
|
||||
keyFile = key name;
|
||||
}) drives;
|
||||
fileSystems = lib.mapAttrs' (
|
||||
name: _:
|
||||
lib.nameValuePair "/mnt/${name}" {
|
||||
device = "/dev/mapper/${name}";
|
||||
fsType = "ext4";
|
||||
options = [ "nofail" ];
|
||||
}
|
||||
) drives;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
amdgpu_top
|
||||
calibre # ebook management and kobo syncing
|
||||
];
|
||||
|
||||
# set hostname
|
||||
networking.hostName = "argon";
|
||||
system.stateVersion = "25.11"; # don't change
|
||||
|
||||
# install state version
|
||||
system.stateVersion = "25.11"; # Don't change
|
||||
}
|
||||
|
||||
|
||||
@@ -1,54 +1,38 @@
|
||||
# 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,
|
||||
...
|
||||
}:
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-crypt dm-mod" ];
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mapper/lvmroot-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/lvmroot-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/AC1C-20EB";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AC1C-20EB";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/mapper/lvmroot-home";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/mapper/lvmroot-swap"; }
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/mapper/lvmroot-home";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/mapper/lvmroot-swap"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
# argon: desktop with two 1440p monitors side by side
|
||||
|
||||
{
|
||||
wayland.windowManager.niri.settings = {
|
||||
input = {
|
||||
touchpad.off = { };
|
||||
trackpoint.off = { };
|
||||
};
|
||||
|
||||
_children = [
|
||||
{
|
||||
output = {
|
||||
_args = [ "DP-1" ];
|
||||
mode = "2560x1440@165.000";
|
||||
scale = 1;
|
||||
transform = "normal";
|
||||
position._props = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
output = {
|
||||
_args = [ "DP-2" ];
|
||||
mode = "2560x1440@143.912";
|
||||
scale = 1;
|
||||
transform = "normal";
|
||||
position._props = {
|
||||
x = 2560;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
# 0x29a nixos config
|
||||
# 0x29a nixos conifg
|
||||
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# use flakes
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# configure bootloader
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
@@ -32,7 +29,7 @@
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# networking
|
||||
networking.hostName = "nixos";
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# time zone.
|
||||
@@ -63,10 +60,9 @@
|
||||
|
||||
windowManager.qtile = {
|
||||
enable = true;
|
||||
extraPackages =
|
||||
python3Packages: with python3Packages; [
|
||||
qtile-extras
|
||||
];
|
||||
extraPackages = python3Packages: with python3Packages; [
|
||||
qtile-extras
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -75,8 +71,8 @@
|
||||
|
||||
# enable sound
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# define a user account
|
||||
@@ -101,10 +97,7 @@
|
||||
autosuggestions.enable = true;
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"sudo"
|
||||
];
|
||||
plugins = [ "git" "sudo" ];
|
||||
theme = "agnoster";
|
||||
};
|
||||
};
|
||||
@@ -123,8 +116,8 @@
|
||||
# Some programs need SUID wrappers
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# enable the OpenSSH daemon
|
||||
@@ -137,3 +130,4 @@
|
||||
# install state version
|
||||
system.stateVersion = "25.05"; # Don't change
|
||||
}
|
||||
|
||||
|
||||
@@ -1,56 +1,36 @@
|
||||
# 0x29a nixos hardware configuration
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
# boot and initrd configs
|
||||
boot.initrd.availableKernelModules = [
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
"dm-snapshot"
|
||||
"cryptd"
|
||||
];
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
|
||||
|
||||
# file systems
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/nixboot";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/nixroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/nixboot";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-label/nixhome";
|
||||
fsType = "ext4";
|
||||
};
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-label/nixswap"; }
|
||||
];
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-label/nixhome";
|
||||
fsType = "ext4";
|
||||
};
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-label/nixswap"; }
|
||||
];
|
||||
|
||||
# enable dhcp on all interfaces
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# user config
|
||||
@@ -29,6 +29,7 @@
|
||||
iotop
|
||||
iftop
|
||||
strace
|
||||
ltrace
|
||||
lsof
|
||||
sysstat
|
||||
lm_sensors
|
||||
@@ -50,16 +51,12 @@
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"sudo"
|
||||
"python"
|
||||
"ansible"
|
||||
];
|
||||
plugins = [ "git" "sudo" "python" "ansible" ];
|
||||
theme = "agnoster";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
## deploy qtile config
|
||||
#home.file."qtile-config" = {
|
||||
# target = ".config/qtile/config.py";
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixos/appimage.nix
|
||||
../../modules/nixos/astro.nix
|
||||
../../modules/nixos/audio.nix
|
||||
../../modules/nixos/bootloader.nix
|
||||
../../modules/nixos/certificates.nix
|
||||
../../modules/nixos/claudecode.nix
|
||||
../../modules/nixos/docker.nix
|
||||
../../modules/nixos/gnupg.nix
|
||||
../../modules/nixos/locales.nix
|
||||
@@ -19,12 +21,12 @@
|
||||
../../modules/nixos/settings.nix
|
||||
../../modules/nixos/steam.nix
|
||||
../../modules/nixos/users.nix
|
||||
../../modules/nixos/vial.nix
|
||||
];
|
||||
|
||||
# host-specific niri config (input devices, laptop binds)
|
||||
home-manager.users.aaron.imports = [ ./niri.nix ];
|
||||
|
||||
# set hostname
|
||||
networking.hostName = "neon";
|
||||
system.stateVersion = "25.11"; # don't change
|
||||
|
||||
# install state version
|
||||
system.stateVersion = "25.11"; # Don't change
|
||||
}
|
||||
|
||||
|
||||
@@ -1,57 +1,39 @@
|
||||
# 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,
|
||||
...
|
||||
}:
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
"dm-snapshot"
|
||||
"cryptd"
|
||||
];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
|
||||
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/nixroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/nixboot";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/nixboot";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-label/nixhome";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-label/nixswap"; }
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-label/nixhome";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-label/nixswap"; }
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# neon: laptop, the built-in display is auto-configured by niri
|
||||
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.niri.settings = {
|
||||
input.touchpad = {
|
||||
tap = { };
|
||||
natural-scroll = { };
|
||||
};
|
||||
|
||||
layout.gaps = lib.mkForce 10;
|
||||
|
||||
binds = {
|
||||
"Print".screenshot = { };
|
||||
"Ctrl+Print".screenshot-screen = { };
|
||||
"Mod+Shift+P".power-off-monitors = { };
|
||||
|
||||
# finer brightness steps
|
||||
"XF86MonBrightnessUp".spawn-sh = lib.mkForce "brightnessctl --class=backlight set +1%";
|
||||
"XF86MonBrightnessDown".spawn-sh = lib.mkForce "brightnessctl --class=backlight set 1%-";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# user fonts
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,41 +1,17 @@
|
||||
# Commits are signed with each machine's ~/.ssh/id_ed25519 through the ssh
|
||||
# agent. gitea verifies them against the account keys; allowed_signers gives
|
||||
# the local git the same trust, so `git log --show-signature` resolves too.
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
email = "aaron@0x29a.ch";
|
||||
signingKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHRhwzo1oxaT3fEySSmILKNnu9v30cfjx5G7FKpmfqeX aaron@argon"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGDkhvvTUcBSQdtXjX+Mw2Bp8HHhtiBm8aJi4ZxiBgZR aaron@neon"
|
||||
];
|
||||
in
|
||||
{
|
||||
xdg.configFile."git/allowed_signers".text = lib.concatMapStrings (
|
||||
key: "${email} ${key}\n"
|
||||
) signingKeys;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
push.autoSetupRemote = true;
|
||||
push = { autoSetupRemote = true; };
|
||||
user = {
|
||||
name = "aaron";
|
||||
inherit email;
|
||||
name = "aaron";
|
||||
email = "aaron@0x29a.ch";
|
||||
};
|
||||
gpg.ssh.allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
|
||||
};
|
||||
signing = {
|
||||
format = "ssh";
|
||||
# the public key makes ssh-keygen sign through the agent
|
||||
key = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
|
||||
signer = "${pkgs.openssh}/bin/ssh-keygen";
|
||||
key = "7A830180A05DAC59CDE43B0677D2F5DB48184456";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
# Only renders ~/.config/niri/config.kdl; niri itself, its session and portals
|
||||
# come from modules/nixos/niri.nix. Outputs and input devices that differ
|
||||
# per machine live in hosts/<host>/niri.nix.
|
||||
|
||||
{ lib, osConfig, ... }:
|
||||
|
||||
let
|
||||
# Mod+1..9 focus a workspace, Mod+Ctrl+1..9 move the column there
|
||||
workspaceBinds = lib.mergeAttrsList (
|
||||
map (n: {
|
||||
"Mod+${toString n}".focus-workspace = n;
|
||||
"Mod+Ctrl+${toString n}".move-column-to-workspace = n;
|
||||
}) (lib.range 1 9)
|
||||
);
|
||||
|
||||
# shell command that also works on the lock screen
|
||||
lockedSh = cmd: {
|
||||
_props.allow-when-locked = true;
|
||||
spawn-sh = cmd;
|
||||
};
|
||||
in
|
||||
{
|
||||
wayland.windowManager.niri = {
|
||||
# only on hosts that run niri
|
||||
enable = osConfig.programs.niri.enable;
|
||||
|
||||
# validate the config against the installed niri
|
||||
package = osConfig.programs.niri.package;
|
||||
systemd.enable = false;
|
||||
portalPackage = null;
|
||||
xwaylandSatellitePackage = null; # installed system-wide
|
||||
|
||||
settings = {
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb.layout = "ch";
|
||||
numlock = { };
|
||||
};
|
||||
mouse = {
|
||||
natural-scroll = { };
|
||||
accel-speed = 0.5;
|
||||
scroll-method = "no-scroll";
|
||||
};
|
||||
};
|
||||
|
||||
environment.GTK_IM_MODULE = "simple";
|
||||
|
||||
layout = {
|
||||
gaps = 16;
|
||||
center-focused-column = "never";
|
||||
|
||||
preset-column-widths._children = [
|
||||
{ proportion = 0.33333; }
|
||||
{ proportion = 0.5; }
|
||||
{ proportion = 0.66667; }
|
||||
{ fixed = 2560; }
|
||||
];
|
||||
|
||||
default-column-width.proportion = 0.5;
|
||||
|
||||
focus-ring = {
|
||||
on = { };
|
||||
width = 2;
|
||||
active-color = "#4c566a";
|
||||
inactive-color = "#2e3440";
|
||||
urgent-color = "#a3be8c";
|
||||
};
|
||||
|
||||
border.off = { };
|
||||
|
||||
shadow = {
|
||||
on = { };
|
||||
draw-behind-window = true;
|
||||
softness = 30;
|
||||
spread = 10;
|
||||
offset._props = {
|
||||
x = 0;
|
||||
y = 5;
|
||||
};
|
||||
color = "#0007";
|
||||
};
|
||||
};
|
||||
|
||||
spawn-at-startup = "noctalia";
|
||||
|
||||
hotkey-overlay.skip-at-startup = { };
|
||||
|
||||
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
|
||||
|
||||
_children = [
|
||||
# Open the Firefox picture-in-picture player as floating by default.
|
||||
{
|
||||
window-rule._children = [
|
||||
{
|
||||
match._props = {
|
||||
app-id = "firefox$";
|
||||
title = "^Picture-in-Picture$";
|
||||
};
|
||||
}
|
||||
{ open-floating = true; }
|
||||
];
|
||||
}
|
||||
# Block out the password manager from screen capture.
|
||||
{
|
||||
window-rule._children = [
|
||||
{ match._props.app-id = "^org\\.keepassxc\\.KeePassXC$"; }
|
||||
{ block-out-from = "screen-capture"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
window-rule = {
|
||||
geometry-corner-radius = 12;
|
||||
clip-to-geometry = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
binds = workspaceBinds // {
|
||||
# programs: terminal, app launcher, screen locker
|
||||
"Mod+Return" = {
|
||||
_props.hotkey-overlay-title = "Open a Terminal";
|
||||
spawn = "ghostty";
|
||||
};
|
||||
"Mod+D" = {
|
||||
_props.hotkey-overlay-title = "Run an Application";
|
||||
spawn-sh = "noctalia msg panel-toggle launcher";
|
||||
};
|
||||
"Super+Alt+L" = {
|
||||
_props.hotkey-overlay-title = "Lock the Screen";
|
||||
spawn-sh = "noctalia msg session lock";
|
||||
};
|
||||
|
||||
# media keys (PipeWire / WirePlumber)
|
||||
"XF86AudioRaiseVolume" = lockedSh "wpctl set-volume @DEFAULT_SINK@ 0.01+ -l 1.0";
|
||||
"XF86AudioLowerVolume" = lockedSh "wpctl set-volume @DEFAULT_SINK@ 0.01-";
|
||||
"XF86AudioMute" = lockedSh "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioMicMute" = lockedSh "wpctl set-mute @DEFAULT_SOURCE@ toggle";
|
||||
"XF86AudioPlay" = lockedSh "playerctl play-pause";
|
||||
"XF86AudioStop" = lockedSh "playerctl stop";
|
||||
"XF86AudioPrev" = lockedSh "playerctl previous";
|
||||
"XF86AudioNext" = lockedSh "playerctl next";
|
||||
"XF86MonBrightnessUp" = lockedSh "brightnessctl --class=backlight set +10%";
|
||||
"XF86MonBrightnessDown" = lockedSh "brightnessctl --class=backlight set 10%-";
|
||||
|
||||
"Mod+O" = {
|
||||
_props.repeat = false;
|
||||
toggle-overview = { };
|
||||
};
|
||||
"Mod+Q" = {
|
||||
_props.repeat = false;
|
||||
close-window = { };
|
||||
};
|
||||
|
||||
# focus / move columns and windows
|
||||
"Mod+Left".focus-column-left = { };
|
||||
"Mod+Down".focus-window-down = { };
|
||||
"Mod+Up".focus-window-up = { };
|
||||
"Mod+Right".focus-column-right = { };
|
||||
"Mod+H".focus-column-left = { };
|
||||
"Mod+J".focus-window-down = { };
|
||||
"Mod+K".focus-window-up = { };
|
||||
"Mod+L".focus-column-right = { };
|
||||
|
||||
"Mod+Shift+Left".move-column-left = { };
|
||||
"Mod+Shift+Down".move-window-down = { };
|
||||
"Mod+Shift+Up".move-window-up = { };
|
||||
"Mod+Shift+Right".move-column-right = { };
|
||||
"Mod+Shift+H".move-column-left = { };
|
||||
"Mod+Shift+J".move-window-down = { };
|
||||
"Mod+Shift+K".move-window-up = { };
|
||||
"Mod+Shift+L".move-column-right = { };
|
||||
|
||||
"Mod+Home".focus-column-first = { };
|
||||
"Mod+End".focus-column-last = { };
|
||||
"Mod+Ctrl+Home".move-column-to-first = { };
|
||||
"Mod+Ctrl+End".move-column-to-last = { };
|
||||
|
||||
# move columns between monitors
|
||||
"Mod+Ctrl+Left".move-column-to-monitor-left = { };
|
||||
"Mod+Ctrl+Down".move-column-to-monitor-down = { };
|
||||
"Mod+Ctrl+Up".move-column-to-monitor-up = { };
|
||||
"Mod+Ctrl+Right".move-column-to-monitor-right = { };
|
||||
"Mod+Ctrl+H".move-column-to-monitor-left = { };
|
||||
"Mod+Ctrl+J".move-column-to-monitor-down = { };
|
||||
"Mod+Ctrl+K".move-column-to-monitor-up = { };
|
||||
"Mod+Ctrl+L".move-column-to-monitor-right = { };
|
||||
|
||||
# workspaces
|
||||
"Mod+Page_Down".focus-workspace-down = { };
|
||||
"Mod+Page_Up".focus-workspace-up = { };
|
||||
"Mod+U".focus-workspace-down = { };
|
||||
"Mod+I".focus-workspace-up = { };
|
||||
"Mod+Ctrl+Page_Down".move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+Page_Up".move-column-to-workspace-up = { };
|
||||
"Mod+Ctrl+U".move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+I".move-column-to-workspace-up = { };
|
||||
|
||||
"Mod+Shift+Page_Down".move-workspace-down = { };
|
||||
"Mod+Shift+Page_Up".move-workspace-up = { };
|
||||
"Mod+Shift+U".move-workspace-down = { };
|
||||
"Mod+Shift+I".move-workspace-up = { };
|
||||
|
||||
# mouse wheel
|
||||
"Mod+WheelScrollDown" = {
|
||||
_props.cooldown-ms = 150;
|
||||
focus-workspace-down = { };
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
_props.cooldown-ms = 150;
|
||||
focus-workspace-up = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
_props.cooldown-ms = 150;
|
||||
move-column-to-workspace-down = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
_props.cooldown-ms = 150;
|
||||
move-column-to-workspace-up = { };
|
||||
};
|
||||
|
||||
"Mod+WheelScrollRight".focus-column-right = { };
|
||||
"Mod+WheelScrollLeft".focus-column-left = { };
|
||||
"Mod+Ctrl+WheelScrollRight".move-column-right = { };
|
||||
"Mod+Ctrl+WheelScrollLeft".move-column-left = { };
|
||||
|
||||
"Mod+Shift+WheelScrollDown".focus-column-right = { };
|
||||
"Mod+Shift+WheelScrollUp".focus-column-left = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollDown".move-column-right = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollUp".move-column-left = { };
|
||||
|
||||
# columns
|
||||
"Mod+BracketLeft".consume-or-expel-window-left = { };
|
||||
"Mod+BracketRight".consume-or-expel-window-right = { };
|
||||
"Mod+Comma".consume-window-into-column = { };
|
||||
"Mod+Period".expel-window-from-column = { };
|
||||
|
||||
"Mod+R".switch-preset-column-width = { };
|
||||
"Mod+Shift+R".switch-preset-window-height = { };
|
||||
"Mod+Ctrl+R".reset-window-height = { };
|
||||
"Mod+F".maximize-column = { };
|
||||
"Mod+Shift+F".fullscreen-window = { };
|
||||
"Mod+Ctrl+F".expand-column-to-available-width = { };
|
||||
|
||||
"Mod+C".center-column = { };
|
||||
"Mod+Ctrl+C".center-visible-columns = { };
|
||||
|
||||
"Mod+Minus".set-column-width = "-10%";
|
||||
"Mod+Equal".set-column-width = "+10%";
|
||||
"Mod+Shift+Minus".set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".set-window-height = "+10%";
|
||||
|
||||
"Mod+Space".toggle-window-floating = { };
|
||||
"Mod+Shift+Space".switch-focus-between-floating-and-tiling = { };
|
||||
"Mod+W".toggle-column-tabbed-display = { };
|
||||
|
||||
# screenshots
|
||||
"Mod+P".screenshot = { };
|
||||
"Alt+Print".screenshot-window = { };
|
||||
|
||||
# escape hatch for apps that inhibit keyboard shortcuts
|
||||
"Mod+Escape" = {
|
||||
_props.allow-inhibiting = false;
|
||||
toggle-keyboard-shortcuts-inhibit = { };
|
||||
};
|
||||
|
||||
"Mod+Shift+E".quit = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
# same nixpkgs as the flake's `follows`, silences nixvim's pin warning
|
||||
# We keep `inputs.nixvim.inputs.nixpkgs.follows = "nixpkgs"` in flake.nix so
|
||||
# the whole config shares a single nixpkgs. Setting `source` explicitly to
|
||||
# that same nixpkgs acknowledges the override and silences nixvim's warning
|
||||
# about its pinned nixpkgs being bypassed.
|
||||
nixpkgs.source = inputs.nixpkgs;
|
||||
|
||||
# set aliases
|
||||
@@ -54,7 +57,7 @@
|
||||
servers.pyright.enable = true;
|
||||
servers.ruff.enable = true;
|
||||
keymaps.lspBuf = {
|
||||
"<leader>K" = "hover";
|
||||
"<leader>K" = "hover";
|
||||
"<leader>gd" = "definition";
|
||||
"<leader>gr" = "references";
|
||||
"<leader>f" = "format";
|
||||
@@ -64,11 +67,7 @@
|
||||
};
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
settings.ensure_installed = [
|
||||
"markdown"
|
||||
"markdown_inline"
|
||||
"typst"
|
||||
];
|
||||
settings.ensure_installed = [ "markdown" "markdown_inline" "typst" ];
|
||||
};
|
||||
plugins.typst-preview = {
|
||||
enable = true;
|
||||
@@ -88,11 +87,7 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
# render in normal mode, raw source in insert
|
||||
render_modes = [
|
||||
"n"
|
||||
"c"
|
||||
"t"
|
||||
];
|
||||
render_modes = [ "n" "c" "t"];
|
||||
pipe_table.preset = "round";
|
||||
heading.width = "block";
|
||||
file_types = [ "markdown" ];
|
||||
@@ -101,6 +96,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
# telescope live_grep
|
||||
home.packages = [ pkgs.ripgrep ];
|
||||
# install dependencies
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# Noctalia v5 shell, managed via home-manager's built-in programs.noctalia module.
|
||||
# The noctalia flake's homeModules.default is not imported: it redeclares the same
|
||||
# options and its disabledModules path ("programs/noctalia.nix") doesn't match HM's.
|
||||
# Noctalia v5 shell, managed via its upstream home-manager module.
|
||||
# See https://docs.noctalia.dev/v5/getting-started/nixos/
|
||||
imports = [ inputs.noctalia.homeModules.default ];
|
||||
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
|
||||
# Use the package from the noctalia flake rather than nixpkgs.
|
||||
# The module's `package` option has no default, so it must be set explicitly.
|
||||
package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
|
||||
# settings is rendered to ~/.config/noctalia/config.toml
|
||||
# settings is rendered to ~/.config/noctalia/config.toml
|
||||
settings = {
|
||||
# theme / colors
|
||||
theme = {
|
||||
@@ -24,18 +23,15 @@
|
||||
|
||||
# general
|
||||
shell = {
|
||||
font_family = "0xProto Nerd Font";
|
||||
font_family = "0xProto Nerd Font Mono";
|
||||
ui_scale = 1.2;
|
||||
avatar_path = "/home/aaron/syncthing/pictures/Logo-Aaron-Totenkopf-rund-schwarz.png";
|
||||
telemetry_enabled = false;
|
||||
clipboard_enabled = true;
|
||||
password_style = "random";
|
||||
|
||||
launcher = {
|
||||
categories = false;
|
||||
providers.emoji.global = false;
|
||||
};
|
||||
|
||||
panel = {
|
||||
launcher_compact = true;
|
||||
open_near_click_control_center = true;
|
||||
open_near_click_session = true;
|
||||
open_near_click_wallpaper = true;
|
||||
@@ -76,22 +72,9 @@
|
||||
radius = 0;
|
||||
scale = 1.2;
|
||||
widget_spacing = 20;
|
||||
start = [
|
||||
"control-center"
|
||||
"cpu"
|
||||
"ram"
|
||||
"temp"
|
||||
"active_window"
|
||||
];
|
||||
start = [ "control-center" "cpu" "ram" "temp" "active_window" ];
|
||||
center = [ "workspaces" ];
|
||||
end = [
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"notifications"
|
||||
"volume"
|
||||
"network"
|
||||
"clock"
|
||||
];
|
||||
end = [ "tray" "bluetooth" "notifications" "volume" "network" "clock" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -100,7 +83,7 @@
|
||||
bluetooth.capsule = true;
|
||||
control-center = {
|
||||
capsule_radius = 8;
|
||||
custom_image = "/home/aaron/syncthing/pictures/nix_flake_logo.png";
|
||||
custom_image = "/home/aaron/Pictures/nix_flake_logo.png";
|
||||
scale = 1.4;
|
||||
};
|
||||
cpu.capsule = true;
|
||||
@@ -119,25 +102,17 @@
|
||||
|
||||
# idle behavior
|
||||
idle = {
|
||||
pre_action_fade_seconds = 5;
|
||||
behavior_order = [
|
||||
"screen-off"
|
||||
"lock"
|
||||
"lock-and-suspend"
|
||||
];
|
||||
behavior_order = [ "screen-off" "lock" "lock-and-suspend" ];
|
||||
behavior = {
|
||||
"screen-off" = {
|
||||
action = "screen_off";
|
||||
enabled = true;
|
||||
timeout = 300;
|
||||
};
|
||||
"lock" = {
|
||||
action = "lock";
|
||||
enabled = true;
|
||||
timeout = 600;
|
||||
};
|
||||
"lock" = {
|
||||
enabled = true;
|
||||
timeout = 660;
|
||||
};
|
||||
"lock-and-suspend" = {
|
||||
action = "lock_and_suspend";
|
||||
enabled = true;
|
||||
timeout = 1800;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# user packages
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
# zsh with oh-my-zsh: agnoster where glyphs render, gentoo on the console.
|
||||
# Deep paths are shortened to `…/last/two` so the prompt stays on one line:
|
||||
# `%(4~|…/%2~|%~)` shows the last two components from four levels down.
|
||||
|
||||
{ lib, ... }:
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# configure z-shell to use omz with some plugins
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"ssh-agent"
|
||||
"gpg-agent"
|
||||
];
|
||||
# runs before oh-my-zsh is sourced
|
||||
# add git and agents as plugins
|
||||
plugins = [ "git" "ssh-agent" "gpg-agent" ];
|
||||
# everything here lands before `source $ZSH/oh-my-zsh.sh`
|
||||
extraConfig = ''
|
||||
# faster git status on large repositories
|
||||
# make omz faster on large repositories
|
||||
DISABLE_UNTRACKED_FILES_DIRTY=true
|
||||
|
||||
# only display a fancy theme when glyphs are rendered
|
||||
if [[ "$TERM" == "linux" || "$TERM" == "screen" ]]; then
|
||||
ZSH_THEME="gentoo"
|
||||
else
|
||||
@@ -28,21 +23,9 @@
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# runs after oh-my-zsh, once the theme's prompt exists
|
||||
initContent = lib.mkAfter ''
|
||||
if [[ "$ZSH_THEME" == "agnoster" ]]; then
|
||||
# agnoster renders prompt_dir on every prompt, so override it
|
||||
prompt_dir() {
|
||||
prompt_segment "$AGNOSTER_DIR_BG" "$AGNOSTER_DIR_FG" '%(4~|…/%2~|%~)'
|
||||
}
|
||||
else
|
||||
# gentoo builds PROMPT once; ascii dots, the console font lacks …
|
||||
PROMPT="''${PROMPT/\%~/%(4~|.../%2~|%~)}"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# set important env vars
|
||||
home.sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
NH_FLAKE = "/home/aaron/git/nixconfig";
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# set gtk theme
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
gtk4.theme = null;
|
||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
|
||||
# set qt theme
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qt6";
|
||||
@@ -20,4 +22,10 @@
|
||||
package = pkgs.adwaita-qt;
|
||||
};
|
||||
};
|
||||
|
||||
# ensure packages are installed
|
||||
home.packages = with pkgs; [
|
||||
gnome-themes-extra
|
||||
adwaita-qt
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,95 +1,60 @@
|
||||
# Nord-style status line built natively, no theme plugin.
|
||||
# The powerline separators (U+E0B0..U+E0B3) are written as escapes via
|
||||
# fromJSON: literal private-use glyphs get stripped silently on copy/paste.
|
||||
# Commas inside #{?...} separate arguments, hence the escaped `#,` below.
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
sep = builtins.fromJSON ''
|
||||
{
|
||||
"right": "",
|
||||
"rightThin": "",
|
||||
"left": "",
|
||||
"leftThin": ""
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
prefix = "C-a";
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
terminal = "tmux-256color"; # truecolor, italics and undercurl in nvim
|
||||
escapeTime = 10; # the 500ms default lags leaving insert mode in nvim
|
||||
focusEvents = true; # nvim autoread
|
||||
historyLimit = 50000;
|
||||
baseIndex = 1; # window numbers match the number row
|
||||
|
||||
terminal = "screen-256color";
|
||||
extraConfig = ''
|
||||
# Status keys
|
||||
set -g status-keys vi
|
||||
|
||||
# outer terminal does 24-bit colour
|
||||
set -sa terminal-features ",*:RGB"
|
||||
|
||||
# forward Shift+Enter and other extended keys as CSI-u (tmux >= 3.5)
|
||||
set -s extended-keys always
|
||||
set -s extended-keys-format csi-u
|
||||
set -as terminal-features '*:extkeys'
|
||||
|
||||
# Status bar options
|
||||
set -g status-interval 5
|
||||
set -g status-interval 1
|
||||
set -g status on
|
||||
set -g status-justify left
|
||||
|
||||
# Clock mode
|
||||
setw -g clock-mode-colour cyan
|
||||
|
||||
# Colors
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
|
||||
# Key bindings
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display-message "tmux.conf reloaded"
|
||||
|
||||
# Panel split and selection, new panes/windows inherit the cwd
|
||||
# Reload configuration
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
# Panel split and selection
|
||||
unbind %
|
||||
unbind '"'
|
||||
bind v split-window -v -c "#{pane_current_path}"
|
||||
bind c split-window -h -c "#{pane_current_path}"
|
||||
bind i new-window -c "#{pane_current_path}"
|
||||
bind -r b previous-window
|
||||
bind -r n next-window
|
||||
|
||||
bind v split-window -v
|
||||
bind c split-window -h
|
||||
bind i new-window
|
||||
bind b previous-window
|
||||
bind n next-window
|
||||
# Move around panes with hjkl
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Resize panes
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
# copy to both the clipboard and primary selection
|
||||
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind H resize-pane -L 5
|
||||
bind J resize-pane -D 5
|
||||
bind K resize-pane -U 5
|
||||
bind L resize-pane -R 5
|
||||
# Wayland clipboard integration
|
||||
# Copy selection to both clipboard (Ctrl+V / Shift+Insert) and primary (middle-click)
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy && wl-copy --primary"
|
||||
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "wl-copy && wl-copy --primary"
|
||||
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy && wl-copy --primary"
|
||||
|
||||
# Kill commands
|
||||
bind q confirm-before -p "kill window #W? (y/n)" kill-window
|
||||
bind Q confirm-before -p "kill session #S? (y/n)" kill-session
|
||||
|
||||
bind q kill-window
|
||||
bind Q kill-session
|
||||
# Bars
|
||||
set -g status-left-length 24
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #{=20:session_name} #[fg=blue,bg=black,nobold,noitalics,nounderscore]${sep.right}"
|
||||
set -g status-right "#{?client_prefix,#[fg=black#,bg=yellow#,bold] ^A ,}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]${sep.left}#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]${sep.leftThin}#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]${sep.left}#[fg=black,bg=cyan,bold] #H "
|
||||
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #{=20:session_name} #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "
|
||||
# Windows
|
||||
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore]${sep.right} #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]${sep.rightThin} #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]${sep.right}"
|
||||
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore]${sep.right} #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore]${sep.rightThin} #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]${sep.right}"
|
||||
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-separator ""
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# Running an AppImage directly fails on NixOS: its runtime dlopens
|
||||
# libfuse.so.2, which nix-ld doesn't cover. appimage-run unpacks the image
|
||||
# into an FHS sandbox instead. Used for the BitBox02 wallet from bitbox.swiss.
|
||||
|
||||
{
|
||||
programs.appimage = {
|
||||
enable = true;
|
||||
binfmt = true; # ./Something.AppImage runs without the appimage-run prefix
|
||||
};
|
||||
}
|
||||
+61
-55
@@ -1,72 +1,78 @@
|
||||
# Stellarium for target finding, Siril for stacking.
|
||||
#
|
||||
# Siril's python plugins run in a venv of foreign manylinux wheels (numpy,
|
||||
# PyQt6, ...), dlopened by nixpkgs python, so nix-ld doesn't help. The wrapper
|
||||
# puts their libs on LD_LIBRARY_PATH, a python on PATH to bootstrap the venv,
|
||||
# and adwaita-qt6 on QT_PLUGIN_PATH so the dark style override resolves.
|
||||
# The python comes from /etc/siril/bin, a stable symlink: a /nix/store path
|
||||
# would leave the venv dangling after the next python bump and gc.
|
||||
#
|
||||
# StarNet++ has no package: unzip the v2 ORT cli build from starnetastro.com
|
||||
# to ~/.local/share/siril/starnet/ and point Siril's preferences at ./starnet2.
|
||||
# It runs through nix-ld and finds its own libs in the bundled ./lib.
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# Siril's Python plugins (sirilpy) run in a venv that pip-installs foreign
|
||||
# manylinux wheels (numpy, GraXpert deps, ...). Those .so files need
|
||||
# libstdc++ at runtime. nix-ld does NOT cover this: it only handles the
|
||||
# initial exec of a foreign binary, but here a *native* nixpkgs python
|
||||
# dlopen()s the foreign wheel. So we put the libs on LD_LIBRARY_PATH, which
|
||||
# the python subprocess inherits from the Siril process.
|
||||
sirilWithPlugins = pkgs.symlinkJoin {
|
||||
name = "siril-with-plugins";
|
||||
paths = [ pkgs.siril ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
# Siril bootstraps its sirilpy venv at first run by locating a `python3`
|
||||
# on PATH. nixpkgs only *propagates* python3 from the siril derivation (it
|
||||
# isn't on the runtime PATH), so without the --prefix PATH below the GUI
|
||||
# fails with "Python not found in system PATH" and never creates
|
||||
# ~/.local/share/siril/venv. We add the same interpreter siril references.
|
||||
#
|
||||
# The VeraLux PyQt6 wheel ships only the built-in Windows/Fusion styles, so
|
||||
# the global QT_STYLE_OVERRIDE=adwaita-dark (inherited from the session) is
|
||||
# rejected ("invalid style override") and windows fall back to a light
|
||||
# theme. We expose nixpkgs adwaita-qt6's style plugin on QT_PLUGIN_PATH so
|
||||
# the override resolves. This works because nixpkgs qt6 and the bundled Qt
|
||||
# share a major.minor (6.11); if they ever drift the plugin is simply
|
||||
# ignored again (harmless warning + Fusion fallback, no loss of function).
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/siril \
|
||||
--prefix PATH : /etc/siril/bin \
|
||||
--prefix PATH : ${lib.makeBinPath [ pkgs.python3 ]} \
|
||||
--prefix QT_PLUGIN_PATH : ${pkgs.adwaita-qt6}/lib/qt-6/plugins \
|
||||
--prefix LD_LIBRARY_PATH : ${
|
||||
lib.makeLibraryPath (
|
||||
with pkgs;
|
||||
[
|
||||
stdenv.cc.cc.lib # libstdc++, libgcc_s, libgomp (numpy)
|
||||
zlib
|
||||
zstd # PyQt6
|
||||
libGL # PyQt6
|
||||
# Qt needs these even on wayland
|
||||
glib
|
||||
fontconfig
|
||||
freetype
|
||||
dbus
|
||||
libxkbcommon
|
||||
# Qt platform plugins: wayland, and the xcb fallback
|
||||
wayland
|
||||
libxcb-cursor
|
||||
libx11
|
||||
libxcb
|
||||
libxcb-util
|
||||
libxcb-wm
|
||||
libxcb-image
|
||||
libxcb-keysyms
|
||||
libxcb-render-util
|
||||
]
|
||||
)
|
||||
}
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [
|
||||
stdenv.cc.cc.lib # libstdc++ / libgcc_s / libgomp (numpy etc.)
|
||||
zlib
|
||||
zstd # libzstd.so.1 (PyQt6)
|
||||
libGL # libGL.so.1 (PyQt6)
|
||||
# PyQt6 (VeraLux) — Qt bundles xcb support so it needs these even
|
||||
# on Wayland; libxkbcommon is the keymap lib used by Wayland too.
|
||||
glib
|
||||
fontconfig
|
||||
freetype
|
||||
dbus
|
||||
libxkbcommon
|
||||
# Qt platform plugins: the wayland plugin (libqwayland.so) needs the
|
||||
# wayland client libs; the xcb fallback needs libxcb-cursor.so.0.
|
||||
wayland # libwayland-client/cursor/egl (wayland plugin)
|
||||
libxcb-cursor # libxcb-cursor.so.0 (xcb plugin)
|
||||
libx11
|
||||
libxcb
|
||||
libxcb-util
|
||||
libxcb-wm
|
||||
libxcb-image
|
||||
libxcb-keysyms
|
||||
libxcb-render-util
|
||||
])}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.stellarium
|
||||
# install stellarium for target finding and siril for stacking
|
||||
environment.systemPackages = with pkgs; [
|
||||
stellarium
|
||||
sirilWithPlugins
|
||||
];
|
||||
|
||||
# same python siril propagates, so sirilpy's abi matches
|
||||
environment.etc."siril/bin/python3".source = "${pkgs.python3}/bin/python3";
|
||||
|
||||
# for StarNet++
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
zlib
|
||||
];
|
||||
};
|
||||
# StarNet++ has no nixpkgs package. Download the StarNet v2 ORT CLI build
|
||||
# (starnet2_linux_*_ORT_x64_cli) from https://www.starnetastro.com/download/
|
||||
# and unzip it to ~/.local/share/siril/starnet/. Then in Siril set
|
||||
# Preferences -> Miscellaneous -> StarNet executable
|
||||
# to the extracted ./starnet2 binary.
|
||||
#
|
||||
# The binary is a generic dynamically-linked ELF, so NixOS needs nix-ld to
|
||||
# run it. Its own opencv/onnxruntime libs are found via the bundled ./lib.
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
stdenv.cc.cc.lib # libstdc++ / libgcc_s
|
||||
zlib
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable sound through pipewire
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# set bootloader to systemd
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
# enable systemd initrd
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
|
||||
# plymouth
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
@@ -17,19 +17,10 @@
|
||||
};
|
||||
|
||||
# kernel options
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"acpi.debug_level=0"
|
||||
];
|
||||
boot.kernelParams = [ "quiet" "acpi.debug_level=0"];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.consoleLogLevel = 2;
|
||||
|
||||
# /tmp in RAM, nix builds go to /var/tmp instead (see settings.nix)
|
||||
boot.tmp = {
|
||||
useTmpfs = true;
|
||||
tmpfsSize = "50%";
|
||||
};
|
||||
|
||||
# Add boot-related packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
efibootmgr
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# install calibre for ebook management and kobo syncing
|
||||
environment.systemPackages = with pkgs; [
|
||||
calibre
|
||||
];
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
caddyRootCA = ''
|
||||
-----BEGIN CERTIFICATE-----
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
claude-code
|
||||
];
|
||||
}
|
||||
@@ -1,15 +1,26 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
# rootless only: no root daemon and no root-equivalent docker group
|
||||
virtualisation.docker.rootless = {
|
||||
# add docker group to user
|
||||
users.users.aaron.extraGroups = [ "docker" ];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
# Customize Docker daemon settings
|
||||
daemon.settings = {
|
||||
dns = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
dns = [ "1.1.1.1" "8.8.8.8" ];
|
||||
log-driver = "journald";
|
||||
registry-mirrors = [ "https://mirror.gcr.io" ];
|
||||
storage-driver = "overlay2";
|
||||
};
|
||||
# Use the rootless mode
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
# Install docker-compose
|
||||
extraPackages = with pkgs; [
|
||||
docker-compose
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
# Add encrypted drives to argon
|
||||
|
||||
{
|
||||
# copy keyfiles into initrd to make them available during early boot
|
||||
boot.initrd.secrets = {
|
||||
"/etc/nixos/keys/data1.key" = "/etc/nixos/keys/data1.key";
|
||||
"/etc/nixos/keys/data2.key" = "/etc/nixos/keys/data2.key";
|
||||
"/etc/nixos/keys/nvmecache.key" = "/etc/nixos/keys/nvmecache.key";
|
||||
};
|
||||
|
||||
# decrypt data drives with keyfiles for argon
|
||||
boot.initrd.luks.devices = {
|
||||
"data1" = {
|
||||
device = "/dev/disk/by-uuid/dfae62cc-bad1-4879-bf9a-461bde833625";
|
||||
keyFile = "/etc/nixos/keys/data1.key";
|
||||
};
|
||||
"data2" = {
|
||||
device = "/dev/disk/by-uuid/8312edae-9247-481b-a313-52a7f848f027";
|
||||
keyFile = "/etc/nixos/keys/data2.key";
|
||||
};
|
||||
"nvmecache" = {
|
||||
device = "/dev/disk/by-uuid/2352250e-4ebe-4f9a-bf66-0d4aaa961bd8";
|
||||
keyFile = "/etc/nixos/keys/nvmecache.key";
|
||||
};
|
||||
};
|
||||
|
||||
# mount decrypted filesystems
|
||||
fileSystems."/mnt/data1" = {
|
||||
device = "/dev/mapper/data1";
|
||||
fsType = "ext4";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/data2" = {
|
||||
device = "/dev/mapper/data2";
|
||||
fsType = "ext4";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/nvmecache" = {
|
||||
device = "/dev/mapper/nvmecache";
|
||||
fsType = "ext4";
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
}
|
||||
+7
-18
@@ -1,26 +1,15 @@
|
||||
# A graphical pinentry never grabs the tty, so a passphrase prompt can't take
|
||||
# over a terminal driven by a coding agent. The cache lasts a working day, and
|
||||
# an unattended signature fails after two minutes instead of blocking forever.
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable gnupg agent
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
settings = {
|
||||
default-cache-ttl = 86400;
|
||||
max-cache-ttl = 86400;
|
||||
pinentry-timeout = 120;
|
||||
};
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.pinentry-curses # fallback for sessions without a display
|
||||
# prime the passphrase cache on demand, e.g. before an agent session
|
||||
(pkgs.writeShellScriptBin "gpg-unlock" ''
|
||||
echo | ${config.programs.gnupg.package}/bin/gpg --clearsign --output /dev/null
|
||||
echo "gpg key unlocked"
|
||||
'')
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnupg
|
||||
pinentry-curses
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# install gnuradio companion along with it's osmocom library
|
||||
environment.systemPackages = with pkgs; [
|
||||
(gnuradio.override {
|
||||
extraPackages = with gnuradio.pkgs; [ osmosdr ];
|
||||
})
|
||||
gqrx
|
||||
hackrf
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable amd GPU acceleration (mesa, vulkan, egl)
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# install amdgpu_top
|
||||
environment.systemPackages = with pkgs; [
|
||||
amdgpu_top
|
||||
];
|
||||
|
||||
# add amdgpu to the initrd for plymouth
|
||||
hardware.amdgpu.initrd.enable = true;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# greetd display manager with tuigreet
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# set the time zone
|
||||
time.timeZone = "Europe/Zurich";
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# user networkmanager
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# wifi firmware and bluetooth
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
# firewall default configs
|
||||
networking.firewall.allowedTCPPorts = [ ];
|
||||
networking.firewall.allowedUDPPorts = [ ];
|
||||
|
||||
# enable wifi firmware
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
# enable bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Add network-related packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard-tools
|
||||
update-systemd-resolved
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# compositor and session; the config itself lives in home-manager
|
||||
# just enable and install niri
|
||||
programs.niri.enable = true;
|
||||
environment.systemPackages = [ pkgs.xwayland-satellite ];
|
||||
|
||||
# Add compositor-related packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
xwayland-satellite
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
# helpers for the noctalia shell (the shell itself comes from home-manager)
|
||||
# install noctalia and helper packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
adw-gtk3
|
||||
adwaita-qt
|
||||
adwaita-qt6
|
||||
brightnessctl
|
||||
ddcutil
|
||||
playerctl
|
||||
wl-clipboard
|
||||
wl-mirror
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable the openssh daemon
|
||||
services.openssh = {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# baseline tools for every host
|
||||
# system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
btop
|
||||
cifs-utils
|
||||
claude-code
|
||||
cowsay
|
||||
dnsutils
|
||||
ethtool
|
||||
@@ -15,17 +14,22 @@
|
||||
imv
|
||||
iperf3
|
||||
jq
|
||||
kdePackages.qtmultimedia
|
||||
ldns
|
||||
lm_sensors
|
||||
lsof
|
||||
ltrace
|
||||
mtr
|
||||
neovim
|
||||
nfs-utils
|
||||
nh
|
||||
nix-output-monitor
|
||||
nmap
|
||||
nvd
|
||||
p7zip
|
||||
pciutils
|
||||
socat
|
||||
sof-firmware
|
||||
strace
|
||||
sysstat
|
||||
tree
|
||||
@@ -34,6 +38,7 @@
|
||||
vim
|
||||
wget
|
||||
which
|
||||
wl-clipboard
|
||||
xz
|
||||
zip
|
||||
zstd
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# wireguard replies may leave on another interface, so strict rpfilter drops them
|
||||
# protonvpn uses wireguard tunnels, which break strict reverse path filtering
|
||||
# because packets arrive on the tunnel interface but may be routed back differently.
|
||||
# "loose" checks that the source is routable through *any* interface (not necessarily
|
||||
# the same one), which is sufficient for wireguard while still preventing IP spoofing.
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
|
||||
environment.systemPackages = [ pkgs.proton-vpn ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
proton-vpn
|
||||
];
|
||||
}
|
||||
|
||||
+14
-4
@@ -1,15 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable sddm and use astronaut theme
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
autoNumlock = true;
|
||||
enableHidpi = true;
|
||||
theme = "sddm-astronaut-theme";
|
||||
extraPackages = [ pkgs.sddm-astronaut ]; # theme's qml dependencies
|
||||
settings = {
|
||||
Theme = {
|
||||
Current = "sddm-astronaut-theme";
|
||||
};
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
sddm-astronaut
|
||||
];
|
||||
};
|
||||
|
||||
# sddm looks for themes in the system path
|
||||
environment.systemPackages = [ pkgs.sddm-astronaut ];
|
||||
# Make the theme available in the system path so sddm can find it
|
||||
environment.systemPackages = with pkgs; [
|
||||
sddm-astronaut
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# list of enabled services on the system
|
||||
services = {
|
||||
|
||||
+29
-19
@@ -1,38 +1,48 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
# nix settings
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
# enable flakes and nix-command
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
# auto-optimize my nix-store
|
||||
auto-optimise-store = true;
|
||||
# parallel builds, each using all cores
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
# cache.nixos.org is the default, these come on top
|
||||
extra-substituters = [ "https://nix-community.cachix.org" ];
|
||||
extra-trusted-public-keys = [
|
||||
# use all cores
|
||||
max-jobs = "auto";
|
||||
# use all available cores per job
|
||||
cores = 0;
|
||||
# add trusted substituters (binary caches)
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
# add keys
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# enable automatic garbage collection
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
# add trusted users (able to modify the nix store)
|
||||
nix.settings.trusted-users = [ "root" "@wheel" ];
|
||||
|
||||
# build on disk, big builds would fill the /tmp tmpfs
|
||||
systemd.services.nix-daemon.environment.TMPDIR = "/var/tmp";
|
||||
|
||||
# steam, protonvpn, discord, etc.
|
||||
# allow unfree packages (steam, protonvpn, discord, etc.)
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# links /libexec from derivations to /run/current-system/sw
|
||||
environment.pathsToLink = [ "/libexec" ];
|
||||
|
||||
# enable home-manager globally
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupCommand = "mv -f {file} {file}.hm-bak-$(date +%Y%m%d%H%M%S)";
|
||||
}
|
||||
|
||||
+11
-4
@@ -1,13 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable steam and open firewall
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# fix black screen when running under xwayland-satellite
|
||||
package = pkgs.steam.override { extraArgs = "-system-composer"; };
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
extraCompatPackages = [ pkgs.proton-ge-bin ];
|
||||
# add proton-glorious-eggroll
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
};
|
||||
|
||||
# fix black screen in steam when using xwayland-satellite
|
||||
programs.steam.package = pkgs.steam.override {
|
||||
extraArgs = "-system-composer";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable Thunar
|
||||
programs.thunar.enable = true;
|
||||
|
||||
# thumbnails: tumbler service plus the path it loads extensions from
|
||||
environment.systemPackages = [ pkgs.tumbler ];
|
||||
# Install Tumbler thumbnailer service
|
||||
environment.systemPackages = with pkgs; [
|
||||
tumbler
|
||||
];
|
||||
|
||||
# Ensure Thunar can locate the thumbnailer extensions
|
||||
environment.pathsToLink = [ "share/thumbnailers" ];
|
||||
}
|
||||
|
||||
+10
-8
@@ -1,16 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# create users
|
||||
users.users.aaron = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"dialout"
|
||||
];
|
||||
group = "users";
|
||||
extraGroups = [ "wheel" "networkmanager" "dialout" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# login shell; plugins and prompt are configured in home-manager
|
||||
programs.zsh.enable = true;
|
||||
# add default zsh config
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# Vial keyboards (lily58 pro r2g) expose a raw HID interface that vial.rocks
|
||||
# drives over WebHID; its /dev/hidraw* node is root-only by default.
|
||||
# The rule ships as 60-vial.rules because uaccess is only applied by
|
||||
# 73-seat-late.rules, and services.udev.extraRules lands at 99, too late.
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.udev.packages = [
|
||||
(pkgs.writeTextFile {
|
||||
name = "vial-udev-rules";
|
||||
destination = "/lib/udev/rules.d/60-vial.rules";
|
||||
# the magic serial matches any vial board; uaccess grants the seat owner
|
||||
text = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", TAG+="uaccess"
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.vial ];
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# statix configuration (run via `lint` in the devenv)
|
||||
|
||||
# Flat assignments like `boot.loader = ...; boot.plymouth = ...;` are the
|
||||
# preferred style in this repo, so don't ask for them to be merged.
|
||||
disabled = [ "repeated_keys" ]
|
||||
|
||||
# Generated by nixos-generate-config, not maintained by hand.
|
||||
ignore = [ "hosts/*/hardware-configuration.nix" ]
|
||||
@@ -1,10 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/home-manager/fonts.nix
|
||||
../../modules/home-manager/git.nix
|
||||
../../modules/home-manager/ghostty.nix
|
||||
../../modules/home-manager/nixvim.nix
|
||||
../../modules/home-manager/niri.nix
|
||||
../../modules/home-manager/noctalia.nix
|
||||
../../modules/home-manager/programs.nix
|
||||
../../modules/home-manager/shell.nix
|
||||
|
||||
Reference in New Issue
Block a user