mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Merge branch 'homelab'
This commit is contained in:
commit
8bbe4f9a6c
26 changed files with 767 additions and 237 deletions
202
flake.lock
generated
202
flake.lock
generated
|
|
@ -5,11 +5,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725392458,
|
||||
"narHash": "sha256-sp1Ps5XBrIwDE0e2QOm2dJRRJ12aEWtJBhzohFwn+K4=",
|
||||
"lastModified": 1730687397,
|
||||
"narHash": "sha256-xluSdua/nB7BVpSx7C3PY5XJOsr9x0IsUwuVHJFpJ+Y=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "4cc6a8289f809ec4470eb01429aa6ed548349a56",
|
||||
"revCount": 14,
|
||||
"rev": "32894dcff264ee50e56f58130ac59bd86a7afb45",
|
||||
"revCount": 17,
|
||||
"type": "git",
|
||||
"url": "https://git.xeno.science/xenofem/actual-nix.git"
|
||||
},
|
||||
|
|
@ -23,11 +23,11 @@
|
|||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708890466,
|
||||
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
|
||||
"lastModified": 1732200724,
|
||||
"narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "665b3c6748534eb766c777298721cece9453fdae",
|
||||
"rev": "153d52373b0fb2d343592871009a286ec8837aec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -52,30 +52,14 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-foot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696725948,
|
||||
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-foot",
|
||||
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-foot",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1720809814,
|
||||
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
|
||||
"lastModified": 1725860795,
|
||||
"narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
|
||||
"rev": "7f795bf75d38e0eea9fed287264067ca187b88a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -84,38 +68,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1665001328,
|
||||
"narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
|
||||
"owner": "kdrag0n",
|
||||
"repo": "base16-kitty",
|
||||
"rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kdrag0n",
|
||||
"repo": "base16-kitty",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696725902,
|
||||
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-tmux",
|
||||
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
@ -184,11 +136,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -257,11 +209,11 @@
|
|||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1689549921,
|
||||
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -294,11 +246,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726440980,
|
||||
"narHash": "sha256-ChhIrjtdu5d83W+YDRH+Ec5g1MmM0xk6hJnkz15Ot7M=",
|
||||
"lastModified": 1732025103,
|
||||
"narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff",
|
||||
"rev": "a46e702093a5c46e192243edbd977d5749e7f294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -315,11 +267,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724435763,
|
||||
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
|
||||
"lastModified": 1730837930,
|
||||
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
|
||||
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -337,11 +289,11 @@
|
|||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726398642,
|
||||
"narHash": "sha256-tBM92BUtvY3vawqzl50VLY/EFhxw9LjuB/QN6QUC4ls=",
|
||||
"lastModified": 1731668526,
|
||||
"narHash": "sha256-ZszfGYOrwol3MGFpttahldT+UOfqXckk6XwZrUyHLxE=",
|
||||
"owner": "thiagokokada",
|
||||
"repo": "nix-alien",
|
||||
"rev": "399c8e50f10d9bace3a024496e5f4dee28bdfdcd",
|
||||
"rev": "97fe58a8ac15663b1ecdebd84d2187eb71f8532d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -352,11 +304,11 @@
|
|||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1710156097,
|
||||
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=",
|
||||
"lastModified": 1731533336,
|
||||
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "3342559a24e85fc164b295c3444e8a139924675b",
|
||||
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -373,11 +325,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726370017,
|
||||
"narHash": "sha256-CJOV4JiLhd++w9K+h2z00DiB4R1CCuElWzhldrXSq5w=",
|
||||
"lastModified": 1731593150,
|
||||
"narHash": "sha256-FvksinoI2Y6kuwH+cKBu1oDA8uPGfoRqgtQV6O8GDc4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "0a2fba621b6bbf06be0b4edd974236e3d2fcc1a9",
|
||||
"rev": "40d882b55e89add1ded379cc99edaab24983d6d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -399,20 +351,20 @@
|
|||
"rev": "a1ab2a1353a38a6642fbc69f118adc08faf7dbcb",
|
||||
"revCount": 628,
|
||||
"type": "git",
|
||||
"url": "ssh://git@codeberg.org/nix-astral/nix-minecraft.git"
|
||||
"url": "https://codeberg.org/nix-astral/nix-minecraft.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@codeberg.org/nix-astral/nix-minecraft.git"
|
||||
"url": "https://codeberg.org/nix-astral/nix-minecraft.git"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1725103162,
|
||||
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
|
||||
"lastModified": 1728492678,
|
||||
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
|
||||
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -424,11 +376,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1726062873,
|
||||
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
|
||||
"lastModified": 1731319897,
|
||||
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
|
||||
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -456,11 +408,11 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1726463316,
|
||||
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||
"lastModified": 1732014248,
|
||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -488,11 +440,11 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1725194671,
|
||||
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
|
||||
"lastModified": 1731531548,
|
||||
"narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
|
||||
"rev": "24f0d4acd634792badd6470134c387a3b039dace",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -536,24 +488,24 @@
|
|||
"inputs": {
|
||||
"base16": "base16",
|
||||
"base16-fish": "base16-fish",
|
||||
"base16-foot": "base16-foot",
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-kitty": "base16-kitty",
|
||||
"base16-tmux": "base16-tmux",
|
||||
"base16-vim": "base16-vim",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_4",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-tmux": "tinted-tmux"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726497442,
|
||||
"narHash": "sha256-fieyqmLEJQqqnuJcg2CAnQ8kHapXHhg9rL48NNWjnPw=",
|
||||
"lastModified": 1732261424,
|
||||
"narHash": "sha256-8uTKUHkaU980J5kRnLYrdwmjZYB88eBGUk1oVgIUHFE=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "149b313ddf91c3cc94309170498b162cec666675",
|
||||
"rev": "b667a340730dd3d0596083aa7c949eef01367c62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -621,6 +573,56 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-foot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1726913040,
|
||||
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716423189,
|
||||
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696725902,
|
||||
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
13
flake.nix
13
flake.nix
|
|
@ -6,7 +6,8 @@
|
|||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
stylix.url = "github:danth/stylix";
|
||||
nix-minecraft.url = "git+ssh://git@codeberg.org/nix-astral/nix-minecraft.git";
|
||||
# nix-minecraft.url = "git+ssh://git@codeberg.org/nix-astral/nix-minecraft.git";
|
||||
nix-minecraft.url = "git+https://codeberg.org/nix-astral/nix-minecraft.git";
|
||||
shabitica.url = "github:lomenzel/shabitica";
|
||||
actual.url = "git+https://git.xeno.science/xenofem/actual-nix.git";
|
||||
nix-alien.url = "github:thiagokokada/nix-alien";
|
||||
|
|
@ -16,9 +17,7 @@
|
|||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
pkgs = import inputs.nixpkgs { inherit system; };
|
||||
|
||||
utils = import ./utils.nix { inherit inputs system; };
|
||||
in {
|
||||
|
|
@ -26,6 +25,12 @@
|
|||
# desktop
|
||||
muon = utils.mkHost ./hosts/muon/configuration.nix;
|
||||
|
||||
# laptop
|
||||
muop = utils.mkHost ./hosts/muop/configuration.nix;
|
||||
|
||||
# vps
|
||||
muho = utils.mkHost ./hosts/muho/configuration.nix;
|
||||
|
||||
# vps
|
||||
mups = utils.mkHost ./hosts/mups/configuration.nix;
|
||||
|
||||
|
|
|
|||
121
hosts/muho/configuration.nix
Normal file
121
hosts/muho/configuration.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{ config, lib, pkgs, inputs, system, ... }:
|
||||
let cfg = config.mods;
|
||||
|
||||
in {
|
||||
# Hardware
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
environment.systemPackages = with inputs.nix-alien.packages.${system};
|
||||
[ nix-alien ];
|
||||
|
||||
# System
|
||||
mods.user.name = "muon";
|
||||
networking.hostName = "muho";
|
||||
networking.hostId = "56e55e83";
|
||||
mods.home.file = ./home.nix;
|
||||
|
||||
# Modules
|
||||
mods.desktop.enable = true;
|
||||
mods.desktop.gaming.enable = true;
|
||||
mods.boot.enable = true;
|
||||
|
||||
mods.theme.enable = true;
|
||||
mods.theme.scheme = "woodland";
|
||||
|
||||
mods.server.media.enable = true;
|
||||
|
||||
mods.server.search.enable = true;
|
||||
|
||||
mods.tailscale.enable = true;
|
||||
mods.wireguard.id = 3;
|
||||
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
# Proprietary </3
|
||||
mods.unfree.steam.enable = true;
|
||||
mods.unfree.nvidia.enable = false;
|
||||
mods.unfree.minecraft.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
||||
## Mouse
|
||||
services.libinput.mouse.accelProfile = "flat";
|
||||
|
||||
## Monitors
|
||||
mods.monitors = {
|
||||
primary = {
|
||||
name = "DVI-I-1";
|
||||
config = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
primary = true;
|
||||
rate = "59.93";
|
||||
};
|
||||
};
|
||||
secondary = {
|
||||
name = "HDMI-1";
|
||||
config = {
|
||||
enable = true;
|
||||
mode = "1280x768";
|
||||
position = "1920x312";
|
||||
rate = "59.99";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.extraInit = ''
|
||||
xset s off -dpms
|
||||
'';
|
||||
|
||||
## GPU (AMD Radeon 7950)
|
||||
## https://wiki.nixos.org/wiki/AMD_GPU
|
||||
boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
## GPU (NVidia GTX 1060)
|
||||
## https://nixos.wiki/wiki/Nvidia
|
||||
# Enable OpenGL
|
||||
# hardware.graphics = { enable = true; };
|
||||
|
||||
# # Load nvidia driver for Xorg and Wayland
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# hardware.nvidia = {
|
||||
|
||||
# # Modesetting is required.
|
||||
# modesetting.enable = true;
|
||||
|
||||
# # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# # Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# # of just the bare essentials.
|
||||
# powerManagement.enable = false;
|
||||
|
||||
# # Fine-grained power management. Turns off GPU when not in use.
|
||||
# # Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
# powerManagement.finegrained = false;
|
||||
|
||||
# # Use the NVidia open source kernel module (not to be confused with the
|
||||
# # independent third-party "nouveau" open source driver).
|
||||
# # Support is limited to the Turing and later architectures. Full list of
|
||||
# # supported GPUs is at:
|
||||
# # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# # Only available from driver 515.43.04+
|
||||
# # Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
# open = false;
|
||||
|
||||
# # Enable the Nvidia settings menu,
|
||||
# # accessible via `nvidia-settings`.
|
||||
# nvidiaSettings = true;
|
||||
|
||||
# # Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# };
|
||||
|
||||
# Version of first install
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
52
hosts/muho/hardware-configuration.nix
Normal file
52
hosts/muho/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# 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 = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.supportedFilesystems = [ "zfs" "ntfs" ];
|
||||
services.zfs.autoScrub.enable = true;
|
||||
services.zfs.autoSnapshot.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/034b9530-2c01-4108-9dbb-44557eddf6d5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9D45-AA14";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
fileSystems."/storage0" = {
|
||||
device = "storage0";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/storage1" = {
|
||||
device = "storage1";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/f7ce07eb-563c-4c65-b465-b6c1ab88aede"; }];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
62
hosts/muho/home.nix
Normal file
62
hosts/muho/home.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ pkgs, lib, osConfig, ... }:
|
||||
let cfg = osConfig.mods;
|
||||
in {
|
||||
# Modules
|
||||
mods.xdg.enable = true;
|
||||
mods.social.enable = true;
|
||||
mods.i3.enable = true;
|
||||
mods.terminal.zsh.enable = true;
|
||||
mods.terminal.emulator.enable = true;
|
||||
mods.terminal.development.enable = true;
|
||||
mods.terminal.tools.enable = true;
|
||||
mods.desktop.development.enable = true;
|
||||
mods.desktop.productivity.enable = true;
|
||||
mods.desktop.media.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
||||
## Monitors
|
||||
xsession.windowManager.i3.config.workspaceOutputAssign = [
|
||||
{
|
||||
workspace = "1";
|
||||
output = "${cfg.monitors.primary.name}";
|
||||
}
|
||||
{
|
||||
workspace = "2";
|
||||
output = "${cfg.monitors.secondary.name}";
|
||||
}
|
||||
];
|
||||
services.autorandr.enable = true;
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
hooks.postswitch = {
|
||||
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
|
||||
"set-wallpaper" = ''
|
||||
${lib.getExe pkgs.feh} --bg-fill --nofehbg ${./wallpaper.png}
|
||||
'';
|
||||
};
|
||||
profiles.default = {
|
||||
fingerprint = {
|
||||
"${cfg.monitors.primary.name}" =
|
||||
"00ffffffffffff004c2d850433324d431a120103803420782aee91a3544c99260f5054bfef80714f8100814081809500a940b30001011a3680a070381f403020350006202000001a000000fd00384b1e5111000a202020202020000000fc0053796e634d61737465720a2020000000ff004831414b3530303030300a202000e9";
|
||||
"${cfg.monitors.secondary.name}" =
|
||||
"00ffffffffffff00410cca140101010134100103804728788a288e9e5548972416484badce0031594559615981800101010101010101a91a00a05000163030203700c48e21000018662150b051001b3040703600c48e21000018000000fc005068696c697073545620283529000000fd002f551f500e000a2020202020200156020323714f930414051f10121103020116150706230907078301000066030c00100080011d00bc52d01e20b8285540c48e2100001a011d007251d01e206e285500c48e2100001e011d80d0721c1620102c2580c48e2100009e011d8018711c1620582c2500c48e2100009ef33980d072382d40102c4580c48e2100001e0000f2";
|
||||
};
|
||||
config = {
|
||||
"${cfg.monitors.primary.name}" = cfg.monitors.primary.config;
|
||||
"${cfg.monitors.secondary.name}" = cfg.monitors.secondary.config;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# wayland.windowManager.hyprland.settings = {
|
||||
# monitor = [
|
||||
# "DP-2,2560x1440@144,0x480,1"
|
||||
# "HDMI-A-2,1920x1080,2560x0,1,transform,3"
|
||||
# ];
|
||||
# input.sensitivity = -0.4;
|
||||
# };
|
||||
|
||||
# Version of first install
|
||||
home.stateVersion = "23.05";
|
||||
}
|
||||
BIN
hosts/muho/wallpaper.png
Normal file
BIN
hosts/muho/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
124
hosts/muop/configuration.nix
Normal file
124
hosts/muop/configuration.nix
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
{ config, lib, pkgs, inputs, system, ... }:
|
||||
let cfg = config.mods;
|
||||
|
||||
in {
|
||||
# Hardware
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
environment.systemPackages = with inputs.nix-alien.packages.${system};
|
||||
[ nix-alien ];
|
||||
|
||||
# System
|
||||
mods.user.name = "muon";
|
||||
networking.hostName = "muop";
|
||||
mods.home.file = ./home.nix;
|
||||
|
||||
# Modules
|
||||
mods.desktop.enable = true;
|
||||
mods.desktop.wayland.enable = false;
|
||||
mods.desktop.gaming.enable = true;
|
||||
mods.boot.enable = false;
|
||||
|
||||
mods.theme.enable = true;
|
||||
mods.theme.scheme = "woodland";
|
||||
mods.theme.wallpaper = ./wallpaper.png;
|
||||
|
||||
mods.containers.steam.enable = false;
|
||||
mods.server.media.enable = false;
|
||||
mods.server.astral.enable = false;
|
||||
mods.server.astral.autoStart = false;
|
||||
|
||||
mods.docker.media.enable = false;
|
||||
|
||||
mods.server.sync.enable = true;
|
||||
mods.tailscale.enable = false;
|
||||
mods.openvpn.enable = false;
|
||||
mods.wireguard.enable = false;
|
||||
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
# Proprietary </3
|
||||
mods.unfree.steam.enable = true;
|
||||
mods.unfree.nvidia.enable = true;
|
||||
mods.unfree.minecraft.enable = false;
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
||||
boot = {
|
||||
tmp.cleanOnBoot = true;
|
||||
bootspec.enable = true;
|
||||
consoleLogLevel = 0;
|
||||
|
||||
kernelParams =
|
||||
[ "cgroup_no_v1=all" "systemd.unified_cgroup_hierarchy=yes" ];
|
||||
initrd.verbose = false;
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.editor = false;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 1;
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
WINIT_HIDPI_FACTOR = "1";
|
||||
# GDK_SCALE = "2";
|
||||
# XCURSOR_SIZE = "24";
|
||||
};
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
open = false;
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
forceFullCompositionPipeline = true;
|
||||
|
||||
powerManagement.enable = true;
|
||||
prime = {
|
||||
sync.enable = true;
|
||||
# offload = {
|
||||
# enable = true;
|
||||
# enableOffloadCmd = true;
|
||||
# };
|
||||
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
pulseaudio.support32Bit = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = false;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
## Mouse
|
||||
services.libinput.mouse.accelProfile = "flat";
|
||||
|
||||
## Monitors
|
||||
mods.monitors = {
|
||||
primary = {
|
||||
name = "eDP-1";
|
||||
config = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
primary = true;
|
||||
rate = "60.00";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Version of first install
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
50
hosts/muop/hardware-configuration.nix
Normal file
50
hosts/muop/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# 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 =
|
||||
[ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/29b32abb-ea5d-4cca-b506-3485d8df430c";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-57f71aee-059c-4ae1-8859-89cfcb21a4af".device =
|
||||
"/dev/disk/by-uuid/57f71aee-059c-4ae1-8859-89cfcb21a4af";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9094-4224";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/bulk" = {
|
||||
device = "/dev/disk/by-uuid/a5a0a375-9dc3-43e6-9e1d-9431d502dbfa";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 8 * 1024;
|
||||
}];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
52
hosts/muop/home.nix
Normal file
52
hosts/muop/home.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ pkgs, lib, osConfig,... }:
|
||||
let cfg = osConfig.mods; in {
|
||||
# Modules
|
||||
mods.xdg.enable = true;
|
||||
mods.social.enable = true;
|
||||
mods.i3.enable = true;
|
||||
mods.terminal.zsh.enable = true;
|
||||
mods.terminal.emulator.enable = true;
|
||||
mods.terminal.development.enable = true;
|
||||
mods.terminal.tools.enable = true;
|
||||
mods.desktop.development.enable = true;
|
||||
mods.desktop.productivity.enable = true;
|
||||
mods.desktop.media.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
||||
## Monitors
|
||||
xsession.windowManager.i3.config.workspaceOutputAssign = [{
|
||||
workspace = "1";
|
||||
output = "${cfg.monitors.primary.name}";
|
||||
}];
|
||||
services.autorandr.enable = true;
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
hooks.postswitch = {
|
||||
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
|
||||
"set-wallpaper" = ''
|
||||
${lib.getExe pkgs.feh} --bg-fill --nofehbg ${./wallpaper.png}
|
||||
'';
|
||||
};
|
||||
profiles.default = {
|
||||
fingerprint = {
|
||||
"${cfg.monitors.primary.name}" = "00ffffffffffff0030e4190500000000001a01049522137803a1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c210000019222480a070381f403020350058c210000019000000fd00283c43430e010a20202020202000000002000c47ff0a3c6e1f182b6e000000001c";
|
||||
};
|
||||
config = {
|
||||
"${cfg.monitors.primary.name}" =
|
||||
cfg.monitors.primary.config;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# wayland.windowManager.hyprland.settings = {
|
||||
# monitor = [
|
||||
# "DP-2,2560x1440@144,0x480,1"
|
||||
# "HDMI-A-2,1920x1080,2560x0,1,transform,3"
|
||||
# ];
|
||||
# input.sensitivity = -0.4;
|
||||
# };
|
||||
|
||||
# Version of first install
|
||||
home.stateVersion = "23.05";
|
||||
}
|
||||
BIN
hosts/muop/wallpaper.png
Normal file
BIN
hosts/muop/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
|
|
@ -13,4 +13,6 @@ in {
|
|||
programs.home-manager.enable = true;
|
||||
home.username = cfg.user.name;
|
||||
home.homeDirectory = "/home/${cfg.user.name}";
|
||||
# home.profileDirectory =
|
||||
# "${config.home.homeDirectory}/.local/state/nix/profile/";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,28 +14,29 @@
|
|||
separator = "";
|
||||
};
|
||||
icons = "awesome5";
|
||||
blocks = [{
|
||||
blocks = [
|
||||
{
|
||||
block = "sound";
|
||||
format = " $icon $volume ";
|
||||
click = [{
|
||||
button = "left";
|
||||
cmd = "pavucontrol";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
block = "time";
|
||||
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
|
||||
interval = 1;
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xsession.windowManager.i3 = let
|
||||
modifier = "Mod4";
|
||||
wsAmount = 10;
|
||||
genSpaces = f: map builtins.toString (
|
||||
builtins.genList f wsAmount
|
||||
);
|
||||
workspaces = genSpaces (x: x+1);
|
||||
genSpaces = f: map builtins.toString (builtins.genList f wsAmount);
|
||||
workspaces = genSpaces (x: x + 1);
|
||||
|
||||
in {
|
||||
enable = true;
|
||||
|
|
@ -53,35 +54,40 @@
|
|||
workspaceAutoBackAndForth = true;
|
||||
focus.wrapping = "yes";
|
||||
|
||||
startup = [ ] ++ lib.optionals config.mods.social.enable [{
|
||||
command = "exec vesktop";
|
||||
}];
|
||||
|
||||
assigns = {
|
||||
"2" = [{ class = "^electron$"; }];
|
||||
"3" = [{ class = "^Steam$"; }];
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
# modKeyComb: string -> valueAction: string
|
||||
# -> keys: [string] -> values: [string]
|
||||
# -> keybindings: attrSet { string -> string }
|
||||
zipBinds = comb: action: keys: values: (
|
||||
builtins.listToAttrs (lib.zipListsWith (k: v: {
|
||||
zipBinds = comb: action: keys: values:
|
||||
(builtins.listToAttrs (lib.zipListsWith (k: v: {
|
||||
name = "${modifier}${comb}${k}";
|
||||
value = "${action} ${v}";
|
||||
}) keys values)
|
||||
);
|
||||
}) keys values));
|
||||
|
||||
moveKeys = ["h" "j" "k" "l"];
|
||||
moveDirs = ["left" "down" "up" "right"];
|
||||
moveKeys = [ "h" "j" "k" "l" ];
|
||||
moveDirs = [ "left" "down" "up" "right" ];
|
||||
|
||||
workspKeys = genSpaces (x: lib.mod (x+1) wsAmount);
|
||||
workspKeys = genSpaces (x: lib.mod (x + 1) wsAmount);
|
||||
|
||||
in lib.mkOptionDefault (
|
||||
(zipBinds "+" "focus" moveKeys moveDirs) //
|
||||
(zipBinds "+Shift+" "move" moveKeys moveDirs) //
|
||||
(zipBinds "+" "workspace number" workspKeys workspaces) //
|
||||
(zipBinds "+Shift+" "move container to workspace number"
|
||||
workspKeys workspaces) //
|
||||
{
|
||||
in lib.mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
|
||||
// (zipBinds "+Shift+" "move" moveKeys moveDirs)
|
||||
// (zipBinds "+" "workspace number" workspKeys workspaces)
|
||||
// (zipBinds "+Shift+" "move container to workspace number" workspKeys
|
||||
workspaces) // {
|
||||
"XF86AudioRaiseVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 +2%";
|
||||
"XF86AudioLowerVolume" =
|
||||
"exec --no-startup-id pactl set-sink-volume 0 -2%";
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
bars = let
|
||||
status_conf =
|
||||
|
|
@ -96,9 +102,7 @@
|
|||
workspaceNumbers = true;
|
||||
trayOutput = "primary";
|
||||
} // config.lib.stylix.i3.bar;
|
||||
in [
|
||||
stylix_bar
|
||||
];
|
||||
in [ stylix_bar ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,13 @@
|
|||
pulseaudio
|
||||
pavucontrol
|
||||
|
||||
# Video
|
||||
stremio
|
||||
|
||||
# Interactive
|
||||
bottles
|
||||
mindustry
|
||||
|
||||
# Podcasts
|
||||
gpodder
|
||||
];
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
|
||||
# password manager
|
||||
bitwarden-desktop
|
||||
|
||||
# documents
|
||||
texliveFull
|
||||
texstudio
|
||||
];
|
||||
|
||||
home.sessionVariables.BROWSER = "librewolf";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ in {
|
|||
config = lib.mkIf config.mods.social.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Communication
|
||||
kotatogram-desktop
|
||||
# kotatogram-desktop
|
||||
signal-desktop
|
||||
vesktop-nogain
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ in {
|
|||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableZshIntegration = lib.mkIf config.mods.terminal.zsh.enable true;
|
||||
};
|
||||
|
||||
home.sessionVariables.EDITOR = "hx";
|
||||
|
|
|
|||
|
|
@ -1,36 +1,35 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.terminal;
|
||||
let cfg = config.mods.terminal;
|
||||
in with lib; {
|
||||
options.mods.terminal.tools.enable = mkEnableOption "enables cli tools";
|
||||
|
||||
config = mkIf cfg.tools.enable {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
# enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
programs = builtins.listToAttrs (map (name: {
|
||||
name = name;
|
||||
value = {
|
||||
enable = true;
|
||||
} // optionalAttrs
|
||||
(builtins.hasAttr "enableZshIntegration" config.programs.${name}) {
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
}) [
|
||||
"zellij"
|
||||
"fzf"
|
||||
"eza"
|
||||
"bat"
|
||||
"zoxide"
|
||||
"dircolors"
|
||||
"yazi"
|
||||
"nix-index"
|
||||
"thefuck"
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
programs.dircolors = {
|
||||
enable = true;
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
"lazygit"
|
||||
"fd"
|
||||
"ripgrep"
|
||||
"bottom"
|
||||
"htop"
|
||||
]);
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# libraries
|
||||
|
|
@ -38,13 +37,11 @@ in with lib; {
|
|||
ueberzugpp
|
||||
|
||||
# file managing
|
||||
fd
|
||||
ripgrep
|
||||
trash-cli
|
||||
|
||||
# programs
|
||||
bottom
|
||||
fend
|
||||
unzip
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options.mods.xdg.enable =
|
||||
lib.mkEnableOption "enables xdg settings";
|
||||
options.mods.xdg.enable = lib.mkEnableOption "enables xdg settings";
|
||||
|
||||
config = lib.mkIf config.mods.xdg.enable {
|
||||
nix.settings.use-xdg-base-directories = true;
|
||||
|
||||
xdg = let
|
||||
browser = ["librewolf.desktop"];
|
||||
browser = [ "librewolf.desktop" ];
|
||||
associations = {
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
|
|
@ -19,13 +20,13 @@
|
|||
"application/x-extension-xhtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
|
||||
"audio/*" = ["mpv.desktop"];
|
||||
"video/*" = ["mpv.dekstop"];
|
||||
"image/*" = ["imv.desktop"];
|
||||
"audio/*" = [ "mpv.desktop" ];
|
||||
"video/*" = [ "mpv.dekstop" ];
|
||||
"image/*" = [ "imv.desktop" ];
|
||||
"application/json" = browser;
|
||||
# "application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
|
||||
"x-scheme-handler/tg" = ["kotatogram-desktop.desktop"];
|
||||
"x-scheme-handler/discord" = ["vesktop.desktop"];
|
||||
"x-scheme-handler/tg" = [ "kotatogram-desktop.desktop" ];
|
||||
"x-scheme-handler/discord" = [ "vesktop.desktop" ];
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -8,10 +8,11 @@
|
|||
|
||||
config = lib.mkIf config.mods.boot.enable {
|
||||
boot.loader = lib.mkIf config.mods.xorg.enable {
|
||||
timeout = 0;
|
||||
timeout = 2;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
zfsSupport = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
gfxmodeEfi = config.mods.monitors.primary.config.mode;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,24 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.mods;
|
||||
wg = cfg.wireguard;
|
||||
|
||||
in with lib; {
|
||||
options.mods = {
|
||||
i2p.enable = lib.mkEnableOption "enables i2p network";
|
||||
tailscale.enable = lib.mkEnableOption "enables tailscale";
|
||||
wireguard.enable = lib.mkEnableOption "enables wireguard client";
|
||||
openvpn.enable = lib.mkEnableOption "enables openvpn config";
|
||||
i2p.enable = mkEnableOption "enables i2p network";
|
||||
tailscale.enable = mkEnableOption "enables tailscale";
|
||||
wireguard.enable = mkEnableOption "enables wireguard client";
|
||||
wireguard.id = mkOption {
|
||||
type = with types; nullOr ints.u8;
|
||||
default = null;
|
||||
};
|
||||
openvpn.enable = mkEnableOption "enables openvpn config";
|
||||
openvpn.config = let
|
||||
username = "${config.mods.user.name}";
|
||||
folder = "${config.users.users.${username}.home}/documents/openvpn/";
|
||||
file = "${config.mods.user.name}.ovpn";
|
||||
in lib.mkOption {
|
||||
in mkOption {
|
||||
description = "the config location";
|
||||
default = "${folder}${file}";
|
||||
};
|
||||
|
|
@ -18,10 +28,10 @@
|
|||
networking.networkmanager.enable = true;
|
||||
services.resolved.enable = true;
|
||||
|
||||
services.tailscale.enable = config.mods.tailscale.enable;
|
||||
services.tailscale.enable = cfg.tailscale.enable;
|
||||
|
||||
services.openvpn.servers = lib.mkIf config.mods.openvpn.enable {
|
||||
remote.config = "config ${config.mods.openvpn.config}";
|
||||
services.openvpn.servers = mkIf cfg.openvpn.enable {
|
||||
remote.config = "config ${cfg.openvpn.config}";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
|
@ -30,7 +40,7 @@
|
|||
4447 # default socks proxy port
|
||||
4444 # default http proxy port
|
||||
];
|
||||
services.i2pd = lib.mkIf config.mods.i2p.enable {
|
||||
services.i2pd = lib.mkIf cfg.i2p.enable {
|
||||
enable = true;
|
||||
proto.sam.enable = true;
|
||||
address = "127.0.0.1";
|
||||
|
|
@ -42,16 +52,17 @@
|
|||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
networking.wg-quick.interfaces = lib.mkIf config.mods.wireguard.enable {
|
||||
networking.wg-quick.interfaces = lib.mkIf (wg.id != null) {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
|
||||
address = [ "10.0.0.${wg.id}/24" "fdc9:281f:04d7:9ee9::${wg.id}/64" ];
|
||||
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||
mtu = 1500;
|
||||
privateKeyFile = "/home/muon/wireguard-keys/private";
|
||||
|
||||
peers = [{
|
||||
publicKey = "2RF8GmTZwQdzVm2l2piYy6U0qiMU3wSxC7Lt8urAjwA=";
|
||||
presharedKeyFile = "/home/muon/wireguard-keys/psk-muon";
|
||||
presharedKeyFile =
|
||||
"/home/muon/wireguard-keys/psk-${config.networking.hostName}";
|
||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||
# ip route add 93.95.230.11 via 192.168.0.1
|
||||
endpoint = "93.95.230.11:51820";
|
||||
|
|
@ -60,24 +71,5 @@
|
|||
};
|
||||
};
|
||||
|
||||
# networking.wireguard.interfaces = lib.mkIf config.mods.wireguard.enable {
|
||||
# wg0 = {
|
||||
# ips = [ "10.100.0.2/24" ];
|
||||
# listenPort = 51820;
|
||||
|
||||
# privateKeyFile = "/home/muon/wireguard-keys/private";
|
||||
|
||||
# peers = [
|
||||
# {
|
||||
# publicKey = "2RF8GmTZwQdzVm2l2piYy6U0qiMU3wSxC7Lt8urAjwA=";
|
||||
# allowedIPs = [ "0.0.0.0/0" ];
|
||||
# # ip route add 93.95.230.11 via 192.168.0.1
|
||||
# endpoint = "93.95.230.11:51820";
|
||||
# persistentKeepalive = 25;
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, lib, config, ... }: let
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
monitorModule = lib.types.submodule {
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
|
|
@ -33,10 +34,10 @@ in {
|
|||
services.xserver.xkb.layout = "us";
|
||||
services.xserver.xkb.options = "caps:escape";
|
||||
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
# services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user =
|
||||
config.mods.user.name;
|
||||
services.displayManager.autoLogin.user = config.mods.user.name;
|
||||
|
||||
systemd.services.display-manager.wants = startupTargets;
|
||||
systemd.services.display-manager.after = startupTargets;
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@
|
|||
./wireguard.nix
|
||||
./headscale.nix
|
||||
./photoprism.nix
|
||||
./search.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,20 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf config.mods.server.media.enable {
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
user="${config.mods.user.name}";
|
||||
user = "${config.mods.user.name}";
|
||||
};
|
||||
|
||||
services.immich = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
host = "0.0.0.0";
|
||||
# user = "${config.mods.user.name}";
|
||||
};
|
||||
|
||||
users.users.immich.extraGroups = [ "video" "render" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
48
modules/nixos/server/search.nix
Normal file
48
modules/nixos/server/search.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
inherit (lib) types mkOption mkEnableOption;
|
||||
cfg = config.mods.server.search;
|
||||
in {
|
||||
options.mods.server.search = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables search engine server";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8081;
|
||||
};
|
||||
|
||||
nginx = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "search";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.searx = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
runInUwsgi = true;
|
||||
uwsgiConfig = {
|
||||
disable-logging = true;
|
||||
http = ":${toString cfg.port}";
|
||||
};
|
||||
|
||||
settings = {
|
||||
server.port = cfg.port;
|
||||
server.bind_address = "0.0.0.0";
|
||||
server.secret_key = "temporary-before-sops";
|
||||
|
||||
enabled_plugins = [ "Hostnames plugin" "Tracker URL remover" ];
|
||||
hostnames.remove = [ "(.*.)?facebook.com$" ];
|
||||
hostnames.replace = {
|
||||
"(.*.)?reddit.com$" = "redlib.northboot.xyz";
|
||||
"(.*.)?youtube.com$" = "invidious.example.com";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.unfree.nvidia;
|
||||
let cfg = config.mods.unfree.nvidia;
|
||||
in {
|
||||
options.mods.unfree.nvidia = {
|
||||
enable = lib.mkEnableOption {
|
||||
|
|
@ -8,7 +7,7 @@ in {
|
|||
description = "enables proprietary nvidia drivers";
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = [ "nvidia-x11" ];
|
||||
default = [ "nvidia-x11" "nvidia-settings" ];
|
||||
description = "unfree packages";
|
||||
};
|
||||
driver = lib.mkOption {
|
||||
|
|
@ -29,11 +28,11 @@ in {
|
|||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
powerManagement.enable = false;
|
||||
# powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
open = false;
|
||||
nvidiaSettings = false;
|
||||
nvidiaSettings = lib.mkDefault false;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages."${cfg.driver}";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,11 +5,7 @@
|
|||
description = "enables proprietary steam software";
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = [
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
];
|
||||
default = [ "steam" "steam-original" "steam-run" "steam-unwrapped" ];
|
||||
description = "unfree packages";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue