Compare commits
90 Commits
feature/do
...
6dcbe4e7c7
| Author | SHA1 | Date | |
|---|---|---|---|
| 6dcbe4e7c7 | |||
|
ee127abe7e
|
|||
|
a14e5b5a77
|
|||
|
69ca1dbaca
|
|||
| c38d3ec7b8 | |||
|
d5d6488761
|
|||
|
e0e282a547
|
|||
| 9f0ee40cc3 | |||
|
68fc3a2df2
|
|||
| 5dfc62fc83 | |||
|
1b82de5c92
|
|||
|
c1d1fb7793
|
|||
| e6bc267161 | |||
|
212dddaffd
|
|||
|
58509367a3
|
|||
|
fdc93aff91
|
|||
|
f9f9c72498
|
|||
|
0fdada8766
|
|||
|
554462128e
|
|||
|
7c0bbf18c8
|
|||
| d1222fc204 | |||
|
da8fa17202
|
|||
| e143872f25 | |||
|
db22935910
|
|||
| b62d9f7630 | |||
|
20e19bb0be
|
|||
|
c31478461e
|
|||
|
073d257ca8
|
|||
|
7b50d5327c
|
|||
| 642e723fd6 | |||
|
9a8090dac2
|
|||
|
4e9ffcf6bd
|
|||
|
02a5d03d1a
|
|||
|
b480e8224d
|
|||
|
32a62aadd4
|
|||
|
619c00e678
|
|||
|
a02da7f66d
|
|||
|
8b616b65af
|
|||
|
17158618ee
|
|||
| 64a12d1cae | |||
|
2fb937b19f
|
|||
|
a7c5cbad41
|
|||
| 52a4a7aca0 | |||
|
e420a4d8b3
|
|||
| 5e19eb0d9a | |||
|
b9450f1bca
|
|||
| a61b330288 | |||
| 03c520923c | |||
|
a193a08f0b
|
|||
|
34cad2a944
|
|||
|
eda6cd9997
|
|||
| 0e68a12e47 | |||
|
d5ce65c91d
|
|||
|
4944f87ce9
|
|||
| 81b04a8b1c | |||
|
ea30328d6b
|
|||
| 97f782b3d9 | |||
|
ad50c751d6
|
|||
|
3494a85734
|
|||
| fcb0161e83 | |||
|
9b02617698
|
|||
|
bd6546263b
|
|||
|
53c2cf1a63
|
|||
|
80638a920b
|
|||
|
e4674e5828
|
|||
|
16ea94e160
|
|||
|
afd3113cf3
|
|||
|
d7a08c2571
|
|||
|
8cdcb15618
|
|||
|
a0fd1e9264
|
|||
|
d60bdd1245
|
|||
|
404868aa85
|
|||
|
7566d0d1ef
|
|||
|
6a132670e2
|
|||
|
f182b2418a
|
|||
| eb0bc149e8 | |||
|
f53a2aceee
|
|||
| d64f10ad3f | |||
|
cc44e68a2e
|
|||
|
b97d6cc47d
|
|||
|
0d495039ee
|
|||
| 64b76ad7fd | |||
|
aea7ba5c97
|
|||
| 135f2bdac9 | |||
|
d288f6828f
|
|||
| 159cd6f2f2 | |||
|
763a69bf09
|
|||
| 9b6ed91d37 | |||
|
39f7658a34
|
|||
| 50b2aaae60 |
@@ -4,7 +4,6 @@
|
||||
- For simplicity I'm using device labels rather than uuids
|
||||
|
||||
1. the partitioning layout should look somewhat like this after the installation
|
||||
|
||||
```bash
|
||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||
nvme0n1 259:0 0 476.9G 0 disk
|
||||
@@ -13,25 +12,26 @@ nvme0n1 259:0 0 476.9G 0 disk
|
||||
└─cryptroot 254:0 0 474.9G 0 crypt
|
||||
├─lvmroot-swap 254:1 0 20G 0 lvm [SWAP]
|
||||
├─lvmroot-home 254:2 0 250G 0 lvm /home
|
||||
└─lvmroot-root 254:3 0 204.9G 0 lvm /nix/store
|
||||
└─lvmroot-root 254:3 0 204.9G 0 lvm /
|
||||
```
|
||||
|
||||
2. prepare the installation
|
||||
> Note: `lsblk` may additionally show `/nix/store` as a mountpoint on `lvmroot-root`. This is not a separate partition. NixOS mounts the root device a second time at `/nix/store` with `ro,nosuid,nodev` flags to enforce store immutability at runtime.
|
||||
|
||||
2. prepare the installation
|
||||
```bash
|
||||
# format the boot partition
|
||||
mkfs.fat -F 32 /dev/sda1 -n "nixboot"
|
||||
mkfs.fat -F 32 /dev/nvme0n1p1 -n "nixboot"
|
||||
# create an encrypted partition
|
||||
cryptsetup luksFormat -y --label="nixcrypt" /dev/sda2
|
||||
cryptsetup luksFormat -y --label="nixcrypt" /dev/nvme0n1p2
|
||||
# open the encrypted partition and map it to /dev/mapper/cryptroot
|
||||
cryptsetup luksOpen /dev/sda2 cryptroot
|
||||
cryptsetup luksOpen /dev/nvme0n1p2 cryptroot
|
||||
|
||||
# create the physical volume
|
||||
pvcreate /dev/mapper/cryptroot
|
||||
# create a volume group inside
|
||||
vgcreate lvmroot /dev/mapper/cryptroot
|
||||
# create the swap volume
|
||||
lvcreate --size 8G lvmroot --name nwap
|
||||
lvcreate --size 8G lvmroot --name swap
|
||||
# if you desire, create a home volume
|
||||
lvcreate --size 150G lvmroot --name home
|
||||
# create the root volume
|
||||
@@ -47,7 +47,7 @@ mkswap -L "nixswap" /dev/mapper/lvmroot-swap
|
||||
# mount root
|
||||
mount /dev/disk/by-label/nixroot /mnt
|
||||
# mount boot
|
||||
mount --mkdir /dev/sda1 /mnt/boot
|
||||
mount --mkdir /dev/nvme0n1p1 /mnt/boot
|
||||
# again, if you did the home volume
|
||||
mount --mkdir /dev/disk/by-label/nixhome /mnt/home
|
||||
# turn on swap
|
||||
@@ -55,13 +55,12 @@ swapon /dev/disk/by-label/nixswap
|
||||
```
|
||||
|
||||
3. prepare nixos
|
||||
|
||||
```bash
|
||||
# generate templates and update the hardware-configuration.nix
|
||||
sudo nixos-generate-config --root /mnt
|
||||
nixos-generate-config --root /mnt
|
||||
|
||||
# add cryptd to the kernelModules
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
|
||||
# add dm-crypt and dm-mod to the kernelModules
|
||||
boot.initrd.kernelModules = [ "dm-crypt" "dm-mod" ];
|
||||
|
||||
# add file systems using labels
|
||||
fileSystems."/" =
|
||||
@@ -86,25 +85,20 @@ boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
|
||||
```
|
||||
|
||||
4. install nixos
|
||||
|
||||
```bash
|
||||
cd /mnt
|
||||
sudo nixos-install
|
||||
nixos-install
|
||||
```
|
||||
|
||||
## how to deploy the inital config
|
||||
|
||||
## how to deploy the initial config
|
||||
- Don't forget to install the bootloader, if you changed it since `nixos-install`
|
||||
|
||||
```bash
|
||||
$ sudo nixos-rebuild --install-bootloader switch --flake .#host_name
|
||||
```
|
||||
|
||||
## how to upgrade the system
|
||||
|
||||
```bash
|
||||
$ cd /path/to/repo
|
||||
$ sudo nix flake update
|
||||
$ nix flake update
|
||||
$ sudo nixos-rebuild switch --flake .#host_name
|
||||
$ sudo nix-collect-garbage
|
||||
```
|
||||
@@ -114,7 +108,6 @@ $ sudo nix-collect-garbage
|
||||
The tool nix-helper is installed by this configuration. It simplifies administrating nixos and adds more output to the rebuild command. It also features a diff after a successful build. The command uses the `NH_FLAKE` environment variable to be able to run from whatever directory.
|
||||
|
||||
Basic commands with a set `NH_FLAKE` variable are:
|
||||
|
||||
```bash
|
||||
$ nh os switch
|
||||
$ nh os build
|
||||
|
||||
93
flake.lock
generated
93
flake.lock
generated
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769996383,
|
||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||
"lastModified": 1775087534,
|
||||
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -28,11 +28,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770491427,
|
||||
"narHash": "sha256-8b+0vixdqGnIIcgsPhjdX7EGPdzcVQqYxF+ujjex654=",
|
||||
"lastModified": 1777004352,
|
||||
"narHash": "sha256-SV+9PgNwZ8jHVCjK6YaCBzaheLSW7cDnm5DpOYrD8Vw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "cbd8a72e5fe6af19d40e2741dc440d9227836860",
|
||||
"rev": "6012cf1fed3eba66115f3fd117b9be6bd2a15b2f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,11 +43,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1770197578,
|
||||
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||
"lastModified": 1776548001,
|
||||
"narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
|
||||
"rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -66,11 +66,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770388595,
|
||||
"narHash": "sha256-0NvpmDqFcJAtRFJE3RDZWnN7PDJBZutoDtN+Cl8a3DY=",
|
||||
"lastModified": 1777051818,
|
||||
"narHash": "sha256-2tuHuYmcg8HQSYamI1FoLLVFFOSYK2Alqr/cGiVIfG4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "51abc532525e486176f9a7b24b17908c60017b54",
|
||||
"rev": "b684241888d9271ab5196383e24098ad4400a372",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -83,14 +83,15 @@
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
],
|
||||
"noctalia-qs": "noctalia-qs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770543184,
|
||||
"narHash": "sha256-2FFYjurrYjCAT6bpN2Fv63G6vDuWybB91uvqBjJfcWE=",
|
||||
"lastModified": 1776888984,
|
||||
"narHash": "sha256-Up2F/eoMuPUsZnPVYdH5TMHe1TBP2Ue1QuWd0vWZoxY=",
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-shell",
|
||||
"rev": "bf1a0f76bb5ca48991d51130022af6bead64d153",
|
||||
"rev": "2c1808f9f8937fc0b82c54af513f7620fec56d71",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -99,6 +100,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"noctalia-qs": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"noctalia",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_2",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1776585574,
|
||||
"narHash": "sha256-j35EWhKoGhKrfcXcAOpoRVgXEPQt41Eukji/h59cnjk=",
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-qs",
|
||||
"rev": "75d180c28a9ab4470e980f3d6f706ad6c5213add",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-qs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
@@ -121,6 +145,43 @@
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"noctalia",
|
||||
"noctalia-qs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775636079,
|
||||
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
57
flake.nix
57
flake.nix
@@ -17,42 +17,29 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: {
|
||||
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 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/default/hardware-configuration.nix
|
||||
./hosts/default/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.aaron.imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
./users/aaron/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
neon = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/neon/hardware-configuration.nix
|
||||
./hosts/neon/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.aaron.imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
./users/aaron/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
default = mkHost "default";
|
||||
neon = mkHost "neon";
|
||||
argon = mkHost "argon";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
33
hosts/argon/configuration.nix
Normal file
33
hosts/argon/configuration.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixos/audio.nix
|
||||
../../modules/nixos/bootloader.nix
|
||||
../../modules/nixos/calibre.nix
|
||||
../../modules/nixos/certificates.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
|
||||
../../modules/nixos/niri.nix
|
||||
../../modules/nixos/noctalia.nix
|
||||
../../modules/nixos/openssh.nix
|
||||
../../modules/nixos/packages.nix
|
||||
../../modules/nixos/protonvpn.nix
|
||||
../../modules/nixos/services.nix
|
||||
../../modules/nixos/settings.nix
|
||||
../../modules/nixos/steam.nix
|
||||
../../modules/nixos/users.nix
|
||||
];
|
||||
|
||||
# set hostname
|
||||
networking.hostName = "argon";
|
||||
|
||||
# install state version
|
||||
system.stateVersion = "25.11"; # Don't change
|
||||
}
|
||||
|
||||
39
hosts/argon/hardware-configuration.nix
Normal file
39
hosts/argon/hardware-configuration.nix
Normal file
@@ -0,0 +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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
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."/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"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -3,11 +3,6 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# use flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
../../modules/nixos/audio.nix
|
||||
../../modules/nixos/bootloader.nix
|
||||
../../modules/nixos/certificates.nix
|
||||
../../modules/nixos/docker.nix
|
||||
../../modules/nixos/gnupg.nix
|
||||
../../modules/nixos/locales.nix
|
||||
../../modules/nixos/networking.nix
|
||||
@@ -19,6 +20,9 @@
|
||||
../../modules/nixos/users.nix
|
||||
];
|
||||
|
||||
# set hostname
|
||||
networking.hostName = "neon";
|
||||
|
||||
# install state version
|
||||
system.stateVersion = "25.11"; # Don't change
|
||||
}
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
clipboard-paste-protection = false;
|
||||
clipboard-read = "allow";
|
||||
font-family = "0xProto Nerd Font Mono";
|
||||
font-size = 9;
|
||||
font-size = 12;
|
||||
gtk-titlebar = false;
|
||||
scrollback-limit = 10000;
|
||||
scrollback-limit = 100000;
|
||||
shell-integration = "zsh";
|
||||
shell-integration-features = "ssh-env,ssh-terminfo";
|
||||
theme = "noctalia"; # generated by noctalia-shell
|
||||
window-decoration = "auto";
|
||||
window-padding-x = 10;
|
||||
|
||||
@@ -22,5 +22,6 @@
|
||||
plugins.telescope.enable = true;
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.indent-blankline.enable = true;
|
||||
extraPlugins = [ pkgs.vimPlugins.plenary-nvim ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
{
|
||||
# user packages
|
||||
home.packages = with pkgs; [
|
||||
devenv
|
||||
discord
|
||||
fastfetch
|
||||
keepassxc
|
||||
screenfetch
|
||||
teamspeak6-client
|
||||
];
|
||||
|
||||
# services and other software
|
||||
services.syncthing.enable = true;
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# browsers
|
||||
programs.chromium.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{ 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;
|
||||
theme = "agnoster";
|
||||
#plugins = [ "git" "ssh-agent" ];
|
||||
# theme will be set below
|
||||
theme = "";
|
||||
plugins = [ "git" "ssh-agent" "gpg-agent" ];
|
||||
};
|
||||
# only display a fancy theme when glyphs are rendered
|
||||
initContent = lib.mkOrder 550 ''
|
||||
if [[ "$TERM" == "linux" || "$TERM" == "screen" ]]; then
|
||||
ZSH_THEME="gentoo"
|
||||
else
|
||||
ZSH_THEME="agnoster"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# set important env vars
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
gtk4.theme = null;
|
||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,12 +40,17 @@
|
||||
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 kill-window
|
||||
bind Q kill-session
|
||||
# Bars
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||
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]"
|
||||
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] #[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]"
|
||||
|
||||
8
modules/nixos/calibre.nix
Normal file
8
modules/nixos/calibre.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# install calibre for ebook management and kobo syncing
|
||||
environment.systemPackages = with pkgs; [
|
||||
calibre
|
||||
];
|
||||
}
|
||||
26
modules/nixos/docker.nix
Normal file
26
modules/nixos/docker.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
# add docker group to user
|
||||
users.users.aaron.extraGroups = [ "docker" ];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
# Customize Docker daemon settings
|
||||
daemon.settings = {
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
||||
47
modules/nixos/drives.nix
Normal file
47
modules/nixos/drives.nix
Normal file
@@ -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" ];
|
||||
};
|
||||
}
|
||||
12
modules/nixos/gnuradio.nix
Normal file
12
modules/nixos/gnuradio.nix
Normal file
@@ -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
|
||||
];
|
||||
}
|
||||
17
modules/nixos/graphics.nix
Normal file
17
modules/nixos/graphics.nix
Normal file
@@ -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;
|
||||
}
|
||||
14
modules/nixos/greetd.nix
Normal file
14
modules/nixos/greetd.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# greetd display manager with tuigreet
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,18 +4,18 @@
|
||||
# set the time zone
|
||||
time.timeZone = "Europe/Zurich";
|
||||
|
||||
# set internationalisation properties
|
||||
# keep system language in english, but use swiss locale for formatting
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
LC_ADDRESS = "de_CH.UTF-8";
|
||||
LC_IDENTIFICATION = "de_CH.UTF-8";
|
||||
LC_MEASUREMENT = "de_CH.UTF-8";
|
||||
LC_MONETARY = "de_CH.UTF-8";
|
||||
LC_NAME = "de_CH.UTF-8";
|
||||
LC_NUMERIC = "de_CH.UTF-8";
|
||||
LC_PAPER = "de_CH.UTF-8";
|
||||
LC_TELEPHONE = "de_CH.UTF-8";
|
||||
LC_TIME = "de_CH.UTF-8";
|
||||
};
|
||||
|
||||
# set console font and keymap
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# set hostnname
|
||||
networking.hostName = "neon";
|
||||
|
||||
# user networkmanager
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
@@ -11,6 +8,9 @@
|
||||
networking.firewall.allowedTCPPorts = [ ];
|
||||
networking.firewall.allowedUDPPorts = [ ];
|
||||
|
||||
# enable wifi firmware
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
# enable bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
|
||||
@@ -5,5 +5,15 @@
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
ports = [ 666 ];
|
||||
|
||||
settings = {
|
||||
AuthenticationMethods = "publickey";
|
||||
KbdInteractiveAuthentication = false;
|
||||
MaxAuthTries = 5;
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
X11Forwarding = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# system packges
|
||||
# system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
btop
|
||||
cowsay
|
||||
dnsutils
|
||||
ethtool
|
||||
file
|
||||
fwupd
|
||||
fwupd-efi
|
||||
ghostty
|
||||
git
|
||||
imagemagick
|
||||
imv
|
||||
iperf3
|
||||
jq
|
||||
kdePackages.qtmultimedia
|
||||
kitty
|
||||
ldns
|
||||
lm_sensors
|
||||
lsof
|
||||
@@ -31,23 +26,19 @@
|
||||
nvd
|
||||
p7zip
|
||||
pciutils
|
||||
sddm-astronaut
|
||||
socat
|
||||
sof-firmware
|
||||
strace
|
||||
sysstat
|
||||
terminus_font
|
||||
tree
|
||||
unzip
|
||||
usbutils
|
||||
vim
|
||||
wl-clipboard
|
||||
wget
|
||||
which
|
||||
xz
|
||||
zip
|
||||
zstd
|
||||
];
|
||||
|
||||
# browser
|
||||
programs.firefox.enable = true;
|
||||
}
|
||||
|
||||
13
modules/nixos/protonvpn.nix
Normal file
13
modules/nixos/protonvpn.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# 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 = with pkgs; [
|
||||
proton-vpn
|
||||
];
|
||||
}
|
||||
@@ -17,4 +17,9 @@
|
||||
sddm-astronaut
|
||||
];
|
||||
};
|
||||
|
||||
# Make the theme available in the system path so sddm can find it
|
||||
environment.systemPackages = with pkgs; [
|
||||
sddm-astronaut
|
||||
];
|
||||
}
|
||||
|
||||
@@ -32,13 +32,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
# allow unfree packages (steam, protonvpn, discord, etc.)
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# links /libexec from derivations to /run/current-system/sw
|
||||
environment.pathsToLink = [ "/libexec" ];
|
||||
# set the default editor to vim
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
# enable home-manager globally
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.backupCommand = "mv -f {file} {file}.hm-bak-$(date +%Y%m%d%H%M%S)";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# allow unfree to install steam
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# enable steam and open firewall
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
users.users.aaron = {
|
||||
isNormalUser = true;
|
||||
group = "users";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
extraGroups = [ "wheel" "networkmanager" "dialout" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
@@ -14,10 +14,5 @@
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "sudo" ];
|
||||
theme = "gentoo";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user