Merge branch 'main' of codeberg.org:muon/home

This commit is contained in:
mups 2024-11-30 11:02:58 +00:00
commit 8e88296e00
26 changed files with 751 additions and 243 deletions

202
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1725392458, "lastModified": 1730687397,
"narHash": "sha256-sp1Ps5XBrIwDE0e2QOm2dJRRJ12aEWtJBhzohFwn+K4=", "narHash": "sha256-xluSdua/nB7BVpSx7C3PY5XJOsr9x0IsUwuVHJFpJ+Y=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "4cc6a8289f809ec4470eb01429aa6ed548349a56", "rev": "32894dcff264ee50e56f58130ac59bd86a7afb45",
"revCount": 14, "revCount": 17,
"type": "git", "type": "git",
"url": "https://git.xeno.science/xenofem/actual-nix.git" "url": "https://git.xeno.science/xenofem/actual-nix.git"
}, },
@ -23,11 +23,11 @@
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
}, },
"locked": { "locked": {
"lastModified": 1708890466, "lastModified": 1732200724,
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "base16.nix", "repo": "base16.nix",
"rev": "665b3c6748534eb766c777298721cece9453fdae", "rev": "153d52373b0fb2d343592871009a286ec8837aec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -52,30 +52,14 @@
"type": "github" "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": { "base16-helix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1720809814, "lastModified": 1725860795,
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-helix", "repo": "base16-helix",
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -84,38 +68,6 @@
"type": "github" "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": { "base16-vim": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -184,11 +136,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -257,11 +209,11 @@
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1689549921, "lastModified": 1731966426,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens", "owner": "SenchoPens",
"repo": "fromYaml", "repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", "rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -294,11 +246,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726440980, "lastModified": 1732025103,
"narHash": "sha256-ChhIrjtdu5d83W+YDRH+Ec5g1MmM0xk6hJnkz15Ot7M=", "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff", "rev": "a46e702093a5c46e192243edbd977d5749e7f294",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -315,11 +267,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1724435763, "lastModified": 1730837930,
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -337,11 +289,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1726398642, "lastModified": 1731668526,
"narHash": "sha256-tBM92BUtvY3vawqzl50VLY/EFhxw9LjuB/QN6QUC4ls=", "narHash": "sha256-ZszfGYOrwol3MGFpttahldT+UOfqXckk6XwZrUyHLxE=",
"owner": "thiagokokada", "owner": "thiagokokada",
"repo": "nix-alien", "repo": "nix-alien",
"rev": "399c8e50f10d9bace3a024496e5f4dee28bdfdcd", "rev": "97fe58a8ac15663b1ecdebd84d2187eb71f8532d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -352,11 +304,11 @@
}, },
"nix-filter": { "nix-filter": {
"locked": { "locked": {
"lastModified": 1710156097, "lastModified": 1731533336,
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
"owner": "numtide", "owner": "numtide",
"repo": "nix-filter", "repo": "nix-filter",
"rev": "3342559a24e85fc164b295c3444e8a139924675b", "rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -373,11 +325,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726370017, "lastModified": 1731593150,
"narHash": "sha256-CJOV4JiLhd++w9K+h2z00DiB4R1CCuElWzhldrXSq5w=", "narHash": "sha256-FvksinoI2Y6kuwH+cKBu1oDA8uPGfoRqgtQV6O8GDc4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "0a2fba621b6bbf06be0b4edd974236e3d2fcc1a9", "rev": "40d882b55e89add1ded379cc99edaab24983d6d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -399,20 +351,20 @@
"rev": "a1ab2a1353a38a6642fbc69f118adc08faf7dbcb", "rev": "a1ab2a1353a38a6642fbc69f118adc08faf7dbcb",
"revCount": 628, "revCount": 628,
"type": "git", "type": "git",
"url": "ssh://git@codeberg.org/nix-astral/nix-minecraft.git" "url": "https://codeberg.org/nix-astral/nix-minecraft.git"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "ssh://git@codeberg.org/nix-astral/nix-minecraft.git" "url": "https://codeberg.org/nix-astral/nix-minecraft.git"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1725103162, "lastModified": 1728492678,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -424,11 +376,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1726062873, "lastModified": 1731319897,
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=", "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f", "rev": "dc460ec76cbff0e66e269457d7b728432263166c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -456,11 +408,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1726463316, "lastModified": 1732014248,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -488,11 +440,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1725194671, "lastModified": 1731531548,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", "narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", "rev": "24f0d4acd634792badd6470134c387a3b039dace",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -536,24 +488,24 @@
"inputs": { "inputs": {
"base16": "base16", "base16": "base16",
"base16-fish": "base16-fish", "base16-fish": "base16-fish",
"base16-foot": "base16-foot",
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
"systems": "systems_4" "systems": "systems_4",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux"
}, },
"locked": { "locked": {
"lastModified": 1726497442, "lastModified": 1732261424,
"narHash": "sha256-fieyqmLEJQqqnuJcg2CAnQ8kHapXHhg9rL48NNWjnPw=", "narHash": "sha256-8uTKUHkaU980J5kRnLYrdwmjZYB88eBGUk1oVgIUHFE=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "149b313ddf91c3cc94309170498b162cec666675", "rev": "b667a340730dd3d0596083aa7c949eef01367c62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -621,6 +573,56 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View file

@ -2,11 +2,12 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:danth/stylix"; 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"; shabitica.url = "github:lomenzel/shabitica";
actual.url = "git+https://git.xeno.science/xenofem/actual-nix.git"; actual.url = "git+https://git.xeno.science/xenofem/actual-nix.git";
nix-alien.url = "github:thiagokokada/nix-alien"; nix-alien.url = "github:thiagokokada/nix-alien";
@ -16,9 +17,7 @@
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import inputs.nixpkgs { pkgs = import inputs.nixpkgs { inherit system; };
inherit system;
};
utils = import ./utils.nix { inherit inputs system; }; utils = import ./utils.nix { inherit inputs system; };
in { in {
@ -26,6 +25,12 @@
# desktop # desktop
muon = utils.mkHost ./hosts/muon/configuration.nix; muon = utils.mkHost ./hosts/muon/configuration.nix;
# laptop
muop = utils.mkHost ./hosts/muop/configuration.nix;
# vps
muho = utils.mkHost ./hosts/muho/configuration.nix;
# vps # vps
mups = utils.mkHost ./hosts/mups/configuration.nix; mups = utils.mkHost ./hosts/mups/configuration.nix;

View file

@ -0,0 +1,92 @@
{ 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 = true;
mods.unfree.minecraft.enable = true;
# Hardware preferences
## Mouse
services.libinput.mouse.accelProfile = "flat";
## Monitors
mods.monitors = {
primary = {
name = "DVI-D-0";
config = {
enable = true;
mode = "1920x1080";
position = "0x0";
primary = true;
rate = "59.93";
};
};
secondary = {
name = "HDMI-0";
config = {
enable = true;
mode = "1280x768";
position = "1920x312";
rate = "59.99";
};
};
};
# Turn off screen-saver
environment.extraInit = ''
xset s off -dpms
'';
environment.variables = {
WINIT_HIDPI_FACTOR = "1";
WINIT_X11_SCALE_FACTOR = "1";
};
hardware.graphics = {
enable = true;
enable32Bit = true;
};
## GPU (AMD Radeon 7950)
## https://wiki.nixos.org/wiki/AMD_GPU
# boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
## GPU (NVidia GTX 1060)
## https://nixos.wiki/wiki/Nvidia
hardware.nvidia.powerManagement.enable = false;
# Version of first install
system.stateVersion = "23.05";
}

View 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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

View 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";
}

View 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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

View file

@ -13,4 +13,6 @@ in {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.username = cfg.user.name; home.username = cfg.user.name;
home.homeDirectory = "/home/${cfg.user.name}"; home.homeDirectory = "/home/${cfg.user.name}";
# home.profileDirectory =
# "${config.home.homeDirectory}/.local/state/nix/profile/";
} }

View file

@ -14,28 +14,29 @@
separator = ""; separator = "";
}; };
icons = "awesome5"; icons = "awesome5";
blocks = [{ blocks = [
block = "sound"; {
format = " $icon $volume "; block = "sound";
click = [{ format = " $icon $volume ";
button = "left"; click = [{
cmd = "pavucontrol"; button = "left";
}]; cmd = "pavucontrol";
} { }];
}
{
block = "time"; block = "time";
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') "; format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
interval = 1; interval = 1;
}]; }
];
}; };
}; };
xsession.windowManager.i3 = let xsession.windowManager.i3 = let
modifier = "Mod4"; modifier = "Mod4";
wsAmount = 10; wsAmount = 10;
genSpaces = f: map builtins.toString ( genSpaces = f: map builtins.toString (builtins.genList f wsAmount);
builtins.genList f wsAmount workspaces = genSpaces (x: x + 1);
);
workspaces = genSpaces (x: x+1);
in { in {
enable = true; enable = true;
@ -53,35 +54,40 @@
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
focus.wrapping = "yes"; focus.wrapping = "yes";
startup = [ ] ++ lib.optionals config.mods.social.enable [{
command = "exec vesktop";
}];
assigns = {
"2" = [{ class = "^electron$"; }];
"3" = [{ class = "^Steam$"; }];
};
keybindings = let keybindings = let
# modKeyComb: string -> valueAction: string # modKeyComb: string -> valueAction: string
# -> keys: [string] -> values: [string] # -> keys: [string] -> values: [string]
# -> keybindings: attrSet { string -> string } # -> keybindings: attrSet { string -> string }
zipBinds = comb: action: keys: values: ( zipBinds = comb: action: keys: values:
builtins.listToAttrs (lib.zipListsWith (k: v: { (builtins.listToAttrs (lib.zipListsWith (k: v: {
name = "${modifier}${comb}${k}"; name = "${modifier}${comb}${k}";
value = "${action} ${v}"; value = "${action} ${v}";
}) keys values) }) keys values));
);
moveKeys = ["h" "j" "k" "l"]; moveKeys = [ "h" "j" "k" "l" ];
moveDirs = ["left" "down" "up" "right"]; moveDirs = [ "left" "down" "up" "right" ];
workspKeys = genSpaces (x: lib.mod (x+1) wsAmount); workspKeys = genSpaces (x: lib.mod (x + 1) wsAmount);
in lib.mkOptionDefault ( in lib.mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
(zipBinds "+" "focus" moveKeys moveDirs) // // (zipBinds "+Shift+" "move" moveKeys moveDirs)
(zipBinds "+Shift+" "move" moveKeys moveDirs) // // (zipBinds "+" "workspace number" workspKeys workspaces)
(zipBinds "+" "workspace number" workspKeys workspaces) // // (zipBinds "+Shift+" "move container to workspace number" workspKeys
(zipBinds "+Shift+" "move container to workspace number" workspaces) // {
workspKeys workspaces) // "XF86AudioRaiseVolume" =
{ "exec --no-startup-id pactl set-sink-volume 0 +2%";
"XF86AudioRaiseVolume" = "XF86AudioLowerVolume" =
"exec --no-startup-id pactl set-sink-volume 0 +2%"; "exec --no-startup-id pactl set-sink-volume 0 -2%";
"XF86AudioLowerVolume" = });
"exec --no-startup-id pactl set-sink-volume 0 -2%";
}
);
bars = let bars = let
status_conf = status_conf =
@ -96,9 +102,7 @@
workspaceNumbers = true; workspaceNumbers = true;
trayOutput = "primary"; trayOutput = "primary";
} // config.lib.stylix.i3.bar; } // config.lib.stylix.i3.bar;
in [ in [ stylix_bar ];
stylix_bar
];
}; };
}; };
}; };

View file

@ -8,6 +8,13 @@
pulseaudio pulseaudio
pavucontrol pavucontrol
# Video
stremio
# Interactive
bottles
mindustry
# Podcasts # Podcasts
gpodder gpodder
]; ];

View file

@ -19,6 +19,10 @@
# password manager # password manager
bitwarden-desktop bitwarden-desktop
# documents
texliveFull
texstudio
]; ];
home.sessionVariables.BROWSER = "librewolf"; home.sessionVariables.BROWSER = "librewolf";

View file

@ -15,7 +15,7 @@ in {
config = lib.mkIf config.mods.social.enable { config = lib.mkIf config.mods.social.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
# Communication # Communication
kotatogram-desktop # kotatogram-desktop
signal-desktop signal-desktop
vesktop-nogain vesktop-nogain

View file

@ -71,6 +71,7 @@ in {
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
enableZshIntegration = lib.mkIf config.mods.terminal.zsh.enable true;
}; };
home.sessionVariables.EDITOR = "hx"; home.sessionVariables.EDITOR = "hx";

View file

@ -1,36 +1,35 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let cfg = config.mods.terminal;
cfg = config.mods.terminal;
in with lib; { in with lib; {
options.mods.terminal.tools.enable = mkEnableOption "enables cli tools"; options.mods.terminal.tools.enable = mkEnableOption "enables cli tools";
config = mkIf cfg.tools.enable { config = mkIf cfg.tools.enable {
programs.zellij = {
enable = true;
# enableZshIntegration = mkIf cfg.zsh.enable true;
};
programs.fzf = { programs = builtins.listToAttrs (map (name: {
enable = true; name = name;
enableZshIntegration = mkIf cfg.zsh.enable true; 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 = { "lazygit"
enable = true; "fd"
enableZshIntegration = mkIf cfg.zsh.enable true; "ripgrep"
}; "bottom"
"htop"
programs.dircolors = { ]);
enable = true;
enableZshIntegration = mkIf cfg.zsh.enable true;
};
programs.yazi = {
enable = true;
enableZshIntegration = mkIf cfg.zsh.enable true;
};
programs.lazygit.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
# libraries # libraries
@ -38,13 +37,11 @@ in with lib; {
ueberzugpp ueberzugpp
# file managing # file managing
fd
ripgrep
trash-cli trash-cli
# programs # programs
bottom
fend fend
unzip
]; ];
}; };
} }

View file

@ -1,10 +1,11 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
options.mods.xdg.enable = options.mods.xdg.enable = lib.mkEnableOption "enables xdg settings";
lib.mkEnableOption "enables xdg settings";
config = lib.mkIf config.mods.xdg.enable { config = lib.mkIf config.mods.xdg.enable {
nix.settings.use-xdg-base-directories = true;
xdg = let xdg = let
browser = ["librewolf.desktop"]; browser = [ "librewolf.desktop" ];
associations = { associations = {
"text/html" = browser; "text/html" = browser;
"x-scheme-handler/http" = browser; "x-scheme-handler/http" = browser;
@ -19,13 +20,13 @@
"application/x-extension-xhtml" = browser; "application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser; "application/x-extension-xht" = browser;
"audio/*" = ["mpv.desktop"]; "audio/*" = [ "mpv.desktop" ];
"video/*" = ["mpv.dekstop"]; "video/*" = [ "mpv.dekstop" ];
"image/*" = ["imv.desktop"]; "image/*" = [ "imv.desktop" ];
"application/json" = browser; "application/json" = browser;
# "application/pdf" = ["org.pwmt.zathura.desktop.desktop"]; # "application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
"x-scheme-handler/tg" = ["kotatogram-desktop.desktop"]; "x-scheme-handler/tg" = [ "kotatogram-desktop.desktop" ];
"x-scheme-handler/discord" = ["vesktop.desktop"]; "x-scheme-handler/discord" = [ "vesktop.desktop" ];
}; };
in { in {
enable = true; enable = true;

View file

@ -8,10 +8,11 @@
config = lib.mkIf config.mods.boot.enable { config = lib.mkIf config.mods.boot.enable {
boot.loader = lib.mkIf config.mods.xorg.enable { boot.loader = lib.mkIf config.mods.xorg.enable {
timeout = 0; timeout = 2;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
grub = { grub = {
enable = true; enable = true;
zfsSupport = true;
efiSupport = true; efiSupport = true;
device = "nodev"; device = "nodev";
gfxmodeEfi = config.mods.monitors.primary.config.mode; gfxmodeEfi = config.mods.monitors.primary.config.mode;

View file

@ -1,14 +1,24 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }:
let
cfg = config.mods;
wg = cfg.wireguard;
in with lib; {
options.mods = { options.mods = {
i2p.enable = lib.mkEnableOption "enables i2p network"; i2p.enable = mkEnableOption "enables i2p network";
tailscale.enable = lib.mkEnableOption "enables tailscale"; tailscale.enable = mkEnableOption "enables tailscale";
wireguard.enable = lib.mkEnableOption "enables wireguard client"; wireguard.enable = mkEnableOption "enables wireguard client";
openvpn.enable = lib.mkEnableOption "enables openvpn config"; wireguard.id = mkOption {
type = with types; nullOr ints.u8;
default = null;
};
openvpn.enable = mkEnableOption "enables openvpn config";
openvpn.config = let openvpn.config = let
username = "${config.mods.user.name}"; username = "${config.mods.user.name}";
folder = "${config.users.users.${username}.home}/documents/openvpn/"; folder = "${config.users.users.${username}.home}/documents/openvpn/";
file = "${config.mods.user.name}.ovpn"; file = "${config.mods.user.name}.ovpn";
in lib.mkOption { in mkOption {
description = "the config location"; description = "the config location";
default = "${folder}${file}"; default = "${folder}${file}";
}; };
@ -18,10 +28,10 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.resolved.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 { services.openvpn.servers = mkIf cfg.openvpn.enable {
remote.config = "config ${config.mods.openvpn.config}"; remote.config = "config ${cfg.openvpn.config}";
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
@ -30,7 +40,7 @@
4447 # default socks proxy port 4447 # default socks proxy port
4444 # default http proxy port 4444 # default http proxy port
]; ];
services.i2pd = lib.mkIf config.mods.i2p.enable { services.i2pd = lib.mkIf cfg.i2p.enable {
enable = true; enable = true;
proto.sam.enable = true; proto.sam.enable = true;
address = "127.0.0.1"; address = "127.0.0.1";
@ -42,17 +52,21 @@
}; };
networking.firewall.allowedUDPPorts = [ 51820 ]; networking.firewall.allowedUDPPorts = [ 51820 ];
networking.wg-quick.interfaces = lib.mkIf config.mods.wireguard.enable { networking.wg-quick.interfaces = lib.mkIf (wg.id != null) {
wg0 = { wg0 = {
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ]; address = [
"10.0.0.${toString wg.id}/24"
"fdc9:281f:04d7:9ee9::${toString wg.id}/64"
];
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ]; dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
mtu = 1500; mtu = 1500;
privateKeyFile = "/home/muon/wireguard-keys/private"; privateKeyFile = "/home/muon/wireguard-keys/private";
peers = [{ peers = [{
publicKey = "2RF8GmTZwQdzVm2l2piYy6U0qiMU3wSxC7Lt8urAjwA="; publicKey = "2RF8GmTZwQdzVm2l2piYy6U0qiMU3wSxC7Lt8urAjwA=";
presharedKeyFile = "/home/muon/wireguard-keys/psk-muon"; presharedKeyFile =
allowedIPs = [ "0.0.0.0/0" "::/0" ]; "/home/muon/wireguard-keys/psk-${config.networking.hostName}";
allowedIPs = [ "10.0.0.${toString wg.id}/24" ];
# ip route add 93.95.230.11 via 192.168.0.1 # ip route add 93.95.230.11 via 192.168.0.1
endpoint = "93.95.230.11:51820"; endpoint = "93.95.230.11:51820";
persistentKeepalive = 25; persistentKeepalive = 25;
@ -60,24 +74,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;
# }
# ];
# };
# };
}; };
} }

View file

@ -1,4 +1,5 @@
{ pkgs, lib, config, ... }: let { pkgs, lib, config, ... }:
let
monitorModule = lib.types.submodule { monitorModule = lib.types.submodule {
options = { options = {
name = lib.mkOption { name = lib.mkOption {
@ -32,11 +33,13 @@ in {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.xkb.layout = "us"; services.xserver.xkb.layout = "us";
services.xserver.xkb.options = "caps:escape"; services.xserver.xkb.options = "caps:escape";
services.xserver.dpi = 96;
services.xserver.displayManager.gdm.enable = true; # services.xserver.displayManager.gdm.enable = true;
services.displayManager.sddm.enable = true;
services.displayManager.sddm.enableHidpi = false;
services.displayManager.autoLogin.enable = true; services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = services.displayManager.autoLogin.user = config.mods.user.name;
config.mods.user.name;
systemd.services.display-manager.wants = startupTargets; systemd.services.display-manager.wants = startupTargets;
systemd.services.display-manager.after = startupTargets; systemd.services.display-manager.after = startupTargets;

View file

@ -9,6 +9,7 @@
./wireguard.nix ./wireguard.nix
./headscale.nix ./headscale.nix
./photoprism.nix ./photoprism.nix
./search.nix
./nginx.nix ./nginx.nix
]; ];
} }

View file

@ -6,12 +6,20 @@
}; };
}; };
config = lib.mkIf config.mods.server.media.enable { config = lib.mkIf config.mods.server.media.enable {
services.jellyfin = { services.jellyfin = {
enable = true; enable = true;
openFirewall = 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" ];
}; };
} }

View 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";
};
};
};
};
}

View file

@ -1,6 +1,5 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let cfg = config.mods.unfree.nvidia;
cfg = config.mods.unfree.nvidia;
in { in {
options.mods.unfree.nvidia = { options.mods.unfree.nvidia = {
enable = lib.mkEnableOption { enable = lib.mkEnableOption {
@ -8,7 +7,7 @@ in {
description = "enables proprietary nvidia drivers"; description = "enables proprietary nvidia drivers";
}; };
packages = lib.mkOption { packages = lib.mkOption {
default = [ "nvidia-x11" ]; default = [ "nvidia-x11" "nvidia-settings" ];
description = "unfree packages"; description = "unfree packages";
}; };
driver = lib.mkOption { driver = lib.mkOption {
@ -19,21 +18,23 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# nixos.wiki/wiki/Nvidia # nixos.wiki/wiki/Nvidia
hardware.graphics = { # hardware.graphics = {
enable = true; # enable = true;
enable32Bit = true; # enable32Bit = true;
}; # };
services.xserver.videoDrivers = [ "nvidia" "nvidia-dkms" ]; services.xserver.videoDrivers = [ "nvidia" "nvidia-dkms" ];
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = false; # Set in configuration.nix
# powerManagement.enable = false;
powerManagement.finegrained = false; powerManagement.finegrained = false;
open = false; open = lib.mkDefault false;
nvidiaSettings = false; nvidiaSettings = lib.mkDefault false;
package = config.boot.kernelPackages.nvidiaPackages."${cfg.driver}"; package = config.boot.kernelPackages.nvidiaPackages."${cfg.driver}";
}; };

View file

@ -5,11 +5,7 @@
description = "enables proprietary steam software"; description = "enables proprietary steam software";
}; };
packages = lib.mkOption { packages = lib.mkOption {
default = [ default = [ "steam" "steam-original" "steam-run" "steam-unwrapped" ];
"steam"
"steam-original"
"steam-run"
];
description = "unfree packages"; description = "unfree packages";
}; };
}; };