My dotfiles for my nixos machines and infra
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update dotfiles, switch to npins (2/3 done), setup homelab

MrSnowy d1489a33 90699a34

+942 -653
+61
default.nix
··· 1 + let 2 + sources = import ./npins; 3 + pkgs-stable = import sources.nixpkgs-stable { 4 + config.allowUnfree = true; 5 + }; 6 + pkgs-unstable = import sources.nixpkgs-unstable { 7 + config.allowUnfree = true; 8 + }; 9 + pkgs-custom = import /mnt/SnowData/snowy/Documents/repos/nixpkgs { 10 + config.allowUnfree = true; 11 + }; 12 + # root_path = toString ./.; 13 + nlib = import ./lib { }; 14 + # wire = import sources.; 15 + in 16 + rec { 17 + repos = { 18 + stable = pkgs-stable; 19 + unstable = pkgs-unstable; 20 + custom = pkgs-custom; 21 + }; 22 + 23 + hosts = { 24 + desktop = nlib.nixosHost rec { 25 + nixpkgs = sources.nixpkgs-unstable; 26 + system = "x86_64-linux"; 27 + lib = import "${nixpkgs}/lib"; 28 + 29 + specialArgs = { 30 + inherit repos; 31 + args = { 32 + inherit sources nixpkgs; 33 + pins = (nlib.gen_pins { inherit lib sources; }); 34 + }; 35 + }; 36 + 37 + modules = [ 38 + ./desktop/default.nix 39 + ]; 40 + }; 41 + 42 + home-server = nlib.nixosHost rec { 43 + nixpkgs = sources.nixpkgs-stable; 44 + system = "x86_64-linux"; 45 + lib = import "${nixpkgs}/lib"; 46 + 47 + specialArgs = { 48 + inherit repos; 49 + args = { 50 + inherit sources nixpkgs; 51 + pins = (nlib.gen_pins { inherit lib sources; }); 52 + }; 53 + }; 54 + 55 + modules = [ 56 + ./home-server/default.nix 57 + ]; 58 + }; 59 + # server = "meow"; 60 + }; 61 + }
+59
desktop/default.nix
··· 1 + { 2 + args, 3 + pkgs, 4 + ... 5 + }: 6 + { 7 + # disabledModules = [ "services/networking/tetrd.nix" ]; 8 + 9 + imports = [ 10 + ./system/configuration.nix # Main configuration 11 + ./system/networking.nix # Network config 12 + ./system/audio.nix 13 + ./hjem-rum/snowy.nix # :3 14 + # ../private/default.nix 15 + 16 + # /mnt/SnowData/snowy/Documents/repos/nixpkgs/nixos/modules/services/networking/tetrd.nix 17 + 18 + args.pins.hjem.nixosModules.default 19 + args.pins.nix-gaming-edge.nixosModules.default 20 + ]; 21 + 22 + nixpkgs = { 23 + # inherit system; 24 + config = { 25 + permittedInsecurePackages = [ ]; 26 + allowUnfree = true; 27 + android_sdk.accept_license = true; 28 + }; 29 + 30 + overlays = [ 31 + args.pins.nix-gaming-edge.overlays.mesa-git 32 + args.pins.nix-gaming-edge.overlays.proton-cachyos 33 + (final: prev: { 34 + # tetrd = repos.custom.tetrd; 35 + }) 36 + ]; 37 + }; 38 + 39 + programs.steam.extraCompatPackages = [ 40 + pkgs.proton-cachyos 41 + ]; 42 + 43 + drivers.mesa-git = { 44 + enable = true; 45 + enableCache = false; 46 + cacheCleanup = { 47 + # protonPackage is null by default - thus Proton caches are not cleaned by default. Must define a protonPackage to clear Proton / engine caches 48 + enable = true; 49 + protonPackage = pkgs.proton-cachyos; # or variation 50 + }; 51 + }; 52 + 53 + hjem = { 54 + clobberByDefault = true; 55 + extraModules = [ 56 + args.pins.hjem-rum.hjemModules.default 57 + ]; 58 + }; 59 + }
-186
desktop/flake.lock
··· 1 - { 2 - "nodes": { 3 - "home-manager": { 4 - "inputs": { 5 - "nixpkgs": [ 6 - "nixpkgs-unstable" 7 - ] 8 - }, 9 - "locked": { 10 - "lastModified": 1766387499, 11 - "narHash": "sha256-AjK3/UKDzeXFeYNLVBaJ3+HLE9he1g5UrlNd4/BM3eA=", 12 - "owner": "nix-community", 13 - "repo": "home-manager", 14 - "rev": "527ad07e6625302b648ed3b28c34b62a79bd103e", 15 - "type": "github" 16 - }, 17 - "original": { 18 - "owner": "nix-community", 19 - "ref": "master", 20 - "repo": "home-manager", 21 - "type": "github" 22 - } 23 - }, 24 - "home-manager_2": { 25 - "inputs": { 26 - "nixpkgs": [ 27 - "zen-browser", 28 - "nixpkgs" 29 - ] 30 - }, 31 - "locked": { 32 - "lastModified": 1765682243, 33 - "narHash": "sha256-yeCxFV/905Wr91yKt5zrVvK6O2CVXWRMSrxqlAZnLp0=", 34 - "owner": "nix-community", 35 - "repo": "home-manager", 36 - "rev": "58bf3ecb2d0bba7bdf363fc8a6c4d49b4d509d03", 37 - "type": "github" 38 - }, 39 - "original": { 40 - "owner": "nix-community", 41 - "repo": "home-manager", 42 - "type": "github" 43 - } 44 - }, 45 - "lsfg-vk-flake": { 46 - "inputs": { 47 - "nixpkgs": [ 48 - "nixpkgs-unstable" 49 - ] 50 - }, 51 - "locked": { 52 - "lastModified": 1756367273, 53 - "narHash": "sha256-u7/qG5xQxW+o51R2lBPj0NxU3oFrUwj78UlCKKNHGAc=", 54 - "owner": "pabloaul", 55 - "repo": "lsfg-vk-flake", 56 - "rev": "62aadfc844b2002abe47cbbc9dfd028033376248", 57 - "type": "github" 58 - }, 59 - "original": { 60 - "owner": "pabloaul", 61 - "ref": "main", 62 - "repo": "lsfg-vk-flake", 63 - "type": "github" 64 - } 65 - }, 66 - "nix-index": { 67 - "inputs": { 68 - "nixpkgs": [ 69 - "nixpkgs-unstable" 70 - ] 71 - }, 72 - "locked": { 73 - "lastModified": 1765267181, 74 - "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=", 75 - "owner": "nix-community", 76 - "repo": "nix-index-database", 77 - "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", 78 - "type": "github" 79 - }, 80 - "original": { 81 - "owner": "nix-community", 82 - "repo": "nix-index-database", 83 - "type": "github" 84 - } 85 - }, 86 - "nixpkgs-extra-unstable": { 87 - "locked": { 88 - "lastModified": 1766314097, 89 - "narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=", 90 - "owner": "NixOS", 91 - "repo": "nixpkgs", 92 - "rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055", 93 - "type": "github" 94 - }, 95 - "original": { 96 - "owner": "NixOS", 97 - "ref": "nixpkgs-unstable", 98 - "repo": "nixpkgs", 99 - "type": "github" 100 - } 101 - }, 102 - "nixpkgs-master": { 103 - "locked": { 104 - "lastModified": 1766403040, 105 - "narHash": "sha256-nA6yZyc/HDo6JsmfX8aiVYEv++QXqzH80QTNRG1KEgQ=", 106 - "owner": "NixOS", 107 - "repo": "nixpkgs", 108 - "rev": "3ffc59654f4bbc433cf7202f43360b9d19aed3ea", 109 - "type": "github" 110 - }, 111 - "original": { 112 - "owner": "NixOS", 113 - "ref": "master", 114 - "repo": "nixpkgs", 115 - "type": "github" 116 - } 117 - }, 118 - "nixpkgs-stable": { 119 - "locked": { 120 - "lastModified": 1766014764, 121 - "narHash": "sha256-+73VffE5GP5fvbib6Hs1Su6LehG+9UV1Kzs90T2gBLA=", 122 - "owner": "NixOS", 123 - "repo": "nixpkgs", 124 - "rev": "2b0d2b456e4e8452cf1c16d00118d145f31160f9", 125 - "type": "github" 126 - }, 127 - "original": { 128 - "owner": "NixOS", 129 - "ref": "nixos-25.05", 130 - "repo": "nixpkgs", 131 - "type": "github" 132 - } 133 - }, 134 - "nixpkgs-unstable": { 135 - "locked": { 136 - "lastModified": 1766070988, 137 - "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", 138 - "owner": "NixOS", 139 - "repo": "nixpkgs", 140 - "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", 141 - "type": "github" 142 - }, 143 - "original": { 144 - "owner": "NixOS", 145 - "ref": "nixos-unstable", 146 - "repo": "nixpkgs", 147 - "type": "github" 148 - } 149 - }, 150 - "root": { 151 - "inputs": { 152 - "home-manager": "home-manager", 153 - "lsfg-vk-flake": "lsfg-vk-flake", 154 - "nix-index": "nix-index", 155 - "nixpkgs-extra-unstable": "nixpkgs-extra-unstable", 156 - "nixpkgs-master": "nixpkgs-master", 157 - "nixpkgs-stable": "nixpkgs-stable", 158 - "nixpkgs-unstable": "nixpkgs-unstable", 159 - "zen-browser": "zen-browser" 160 - } 161 - }, 162 - "zen-browser": { 163 - "inputs": { 164 - "home-manager": "home-manager_2", 165 - "nixpkgs": [ 166 - "nixpkgs-unstable" 167 - ] 168 - }, 169 - "locked": { 170 - "lastModified": 1766378463, 171 - "narHash": "sha256-ZGTxrMJktO2TiqrWdZZ7FCw26LKcw3sJkn9MnDLWg4I=", 172 - "owner": "0xc000022070", 173 - "repo": "zen-browser-flake", 174 - "rev": "b6b1e625e4aa049b59930611fc20790c0ccbc840", 175 - "type": "github" 176 - }, 177 - "original": { 178 - "owner": "0xc000022070", 179 - "repo": "zen-browser-flake", 180 - "type": "github" 181 - } 182 - } 183 - }, 184 - "root": "root", 185 - "version": 7 186 - }
-95
desktop/flake.nix
··· 1 - { 2 - description = "Snowflake flake, heh"; 3 - 4 - inputs = { 5 - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05"; 6 - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; 7 - nixpkgs-extra-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 8 - nixpkgs-master.url = "github:NixOS/nixpkgs/master"; 9 - home-manager = { 10 - # url = "github:nix-community/home-manager/release-25.05"; 11 - url = "github:nix-community/home-manager/master"; 12 - inputs.nixpkgs.follows = "nixpkgs-unstable"; 13 - }; 14 - 15 - zen-browser = { 16 - url = "github:0xc000022070/zen-browser-flake"; 17 - inputs.nixpkgs.follows = "nixpkgs-unstable"; 18 - }; 19 - 20 - # hyprland.url = "github:hyprwm/Hyprland"; 21 - 22 - # chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; 23 - 24 - lsfg-vk-flake = { 25 - url = "github:pabloaul/lsfg-vk-flake/main"; 26 - inputs.nixpkgs.follows = "nixpkgs-unstable"; 27 - }; 28 - 29 - nix-index = { 30 - url = "github:nix-community/nix-index-database"; 31 - inputs.nixpkgs.follows = "nixpkgs-unstable"; 32 - }; 33 - 34 - # spicetify-nix.url = "github:Gerg-L/spicetify-nix"; 35 - }; 36 - 37 - outputs = 38 - { 39 - ... 40 - }@inputs: 41 - { 42 - 43 - nixosConfigurations = { 44 - Snowflake = 45 - let 46 - system = "x86_64-linux"; 47 - repos = import ./repos.nix { inherit inputs system; }; 48 - in 49 - # Set the default pkgs the system follows 50 - repos.pkgs-system { 51 - inherit system; 52 - 53 - # This makes these args available in all other modules 54 - specialArgs = { 55 - inherit inputs; 56 - inherit repos; 57 - }; 58 - 59 - modules = [ 60 - { 61 - nixpkgs = { 62 - inherit system; 63 - config.allowUnfree = true; 64 - config.android_sdk.accept_license = true; 65 - overlays = [ 66 - (final: prev: { 67 - }) 68 - ]; 69 - }; 70 - } 71 - 72 - ./system/configuration.nix # Main configuration 73 - ./system/networking.nix # Network config 74 - 75 - # inputs.chaotic.nixosModules.default 76 - inputs.lsfg-vk-flake.nixosModules.default 77 - 78 - inputs.home-manager.nixosModules.home-manager 79 - { 80 - home-manager.useGlobalPkgs = true; 81 - home-manager.useUserPackages = true; 82 - home-manager.extraSpecialArgs = { 83 - inherit repos; 84 - # inherit pkgs-modrinth-fix; 85 - inherit inputs; 86 - }; 87 - home-manager.users = { 88 - snowy = import ./home-manager/snowy.nix; 89 - }; 90 - } 91 - ]; 92 - }; 93 - }; 94 - }; 95 - }
+154
desktop/hjem-rum/snowy.nix
··· 1 + { 2 + args, 3 + config, 4 + pkgs, 5 + # repos, 6 + ... 7 + }: 8 + 9 + { 10 + users.users.snowy.packages = with pkgs; [ 11 + # factorio 12 + # factorio-space-age 13 + args.pins.zen-browser.packages."${stdenv.hostPlatform.system}".twilight 14 + zed-editor 15 + vscode 16 + helix 17 + 18 + wire 19 + ctop 20 + waypipe 21 + ente-desktop 22 + tauon 23 + yt-dlp 24 + mpv 25 + 26 + jetbrains.idea 27 + jetbrains.rider 28 + orca-slicer 29 + unityhub 30 + 31 + #language servers 32 + bash-language-server 33 + hyprls 34 + kdePackages.qtdeclarative 35 + kdePackages.qtutilities 36 + python313Packages.python-lsp-server 37 + 38 + chafa 39 + # repos.unstable.grayjay 40 + 41 + # gaphor 42 + # d-spyd 43 + # bustle 44 + 45 + rustup 46 + gcc 47 + just 48 + jujutsu 49 + sops 50 + 51 + # silly game 52 + clonehero 53 + 54 + # silly 55 + papers 56 + loupe 57 + gnome-clocks 58 + helvum 59 + krita 60 + # orca-slicer 61 + protonplus 62 + protontricks 63 + winetricks 64 + obsidian 65 + element-desktop 66 + radio-cli # rust 67 + heroic 68 + # hydralauncher 69 + 70 + wineWowPackages.staging 71 + easyeffects 72 + 73 + monocraft 74 + python3 75 + jellyfin-desktop 76 + # wine64 77 + # hyprlandPlugins.hyprsplit 78 + ]; 79 + 80 + hjem.users.snowy = { 81 + enable = true; 82 + directory = config.users.users.snowy.home; 83 + user = "snowy"; 84 + # environment.sessionVariables = { 85 + 86 + # }; 87 + 88 + xdg = { 89 + config.files = { 90 + "environment.d/10-hjem-rum.conf" = { 91 + text = '' 92 + POLKIT_GNOME = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; 93 + 94 + XCURSOR_THEME = "phinger-cursors-light"; 95 + XCURSOR_SIZE = "24"; 96 + ''; 97 + }; 98 + }; 99 + 100 + data.files = { 101 + "icons/default/index.theme" = { 102 + text = '' 103 + [Icon Theme] 104 + Name=Default 105 + Comment=Default Cursor Theme 106 + Inherits=Phinger Cursors (light) 107 + ''; 108 + }; 109 + "icons/phinger-cursors-light" = { 110 + source = "${pkgs.phinger-cursors}/share/icons/phinger-cursors-light"; 111 + }; 112 + }; 113 + }; 114 + 115 + rum = { 116 + programs = { 117 + direnv = { 118 + enable = true; 119 + integrations = { 120 + fish.enable = true; 121 + nix-direnv.enable = true; 122 + }; 123 + settings = { 124 + global = { 125 + log_filter = "^$"; 126 + log_format = "-"; 127 + }; 128 + }; 129 + }; 130 + 131 + helix = { 132 + enable = true; 133 + }; 134 + 135 + nix-your-shell = { 136 + enable = true; 137 + integrations.fish.enable = true; 138 + }; 139 + 140 + obs-studio = { 141 + enable = true; 142 + package = pkgs.wrapOBS { 143 + plugins = with pkgs.obs-studio-plugins; [ 144 + obs-vkcapture 145 + obs-pipewire-audio-capture 146 + obs-text-pthread 147 + ]; 148 + }; 149 + }; 150 + }; 151 + 152 + }; 153 + }; 154 + }
-156
desktop/home-manager/snowy.nix
··· 1 - { 2 - inputs, 3 - pkgs, 4 - config, 5 - repos, 6 - ... 7 - }: 8 - 9 - { 10 - imports = [ 11 - inputs.nix-index.homeModules.nix-index 12 - # inputs.zen-browser.homeModules.beta 13 - # inputs.spicetify-nix.homeManagerModules.spicetify 14 - ]; 15 - 16 - # home.file = { 17 - # ".config/hypr/hyprland.conf" = { 18 - # source = config.lib.file.mkOutOfStoreSymlink "./snowy/hypr/hyprland.conf"; 19 - # }; 20 - # ".config/mpv/mpv.conf" = { 21 - # source = config.lib.file.mkOutOfStoreSymlink "./snowy/mpv/mpv.conf"; 22 - # }; 23 - # }; 24 - 25 - home.packages = with pkgs; [ 26 - inputs.zen-browser.packages."${stdenv.hostPlatform.system}".twilight 27 - repos.extra-unstable.zed-editor 28 - # corretto17 29 - # android-studio 30 - # forgejo-actions-runner 31 - ctop 32 - # pkgs-modrinth-fix.modrinth-app 33 - # zed stuffz 34 - ente-desktop 35 - vscode 36 - helix 37 - mpv 38 - tauon 39 - yt-dlp 40 - 41 - # shellcheck # for zed basher? 42 - # vscodium 43 - jetbrains.idea 44 - jetbrains.rider 45 - orca-slicer 46 - # godot 47 - unityhub 48 - # simplex-chat-desktop 49 - 50 - #language servers 51 - bash-language-server 52 - hyprls 53 - kdePackages.qtdeclarative 54 - kdePackages.qtutilities 55 - python313Packages.python-lsp-server 56 - 57 - fzf # for fish 58 - chafa 59 - # hextazy 60 - # repos.extra-unstable.grayjay 61 - 62 - # gaphor 63 - # d-spyd 64 - # bustle 65 - 66 - rustup 67 - gcc 68 - just 69 - jujutsu 70 - sops 71 - 72 - # silly game 73 - clonehero 74 - 75 - # silly 76 - papers 77 - loupe 78 - gnome-clocks 79 - helvum 80 - krita 81 - # orca-slicer 82 - protonplus 83 - protontricks 84 - winetricks 85 - obsidian 86 - element-desktop 87 - radio-cli # rust 88 - heroic 89 - # hydralauncher 90 - 91 - wineWowPackages.staging 92 - easyeffects 93 - 94 - monocraft 95 - python3 96 - repos.master.jellyfin-desktop 97 - # wine64 98 - # nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit 99 - ]; 100 - 101 - systemd.user.sessionVariables = { 102 - # Define some locations of some files, this seemed like the least wack way to do things. 103 - POLKIT_GNOME = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; 104 - # LIB_HYPRSPLIT = "${nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit}/lib/libhyprsplit.so"; 105 - }; 106 - 107 - # programs.spicetify = 108 - # let 109 - # spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; 110 - # in 111 - # { 112 - # enable = true; 113 - # enabledExtensions = with spicePkgs.extensions; [ 114 - # adblockify 115 - # # hidePodcasts 116 - # # shuffle # shuffle+ (special characters are sanitized out of extension names) 117 - # ]; 118 - # theme = spicePkgs.themes.catppuccin; 119 - # colorScheme = "mocha"; 120 - # }; 121 - 122 - programs = { 123 - nix-your-shell = { 124 - enable = true; 125 - enableFishIntegration = true; 126 - }; 127 - 128 - obs-studio = { 129 - enable = true; 130 - plugins = with pkgs; [ 131 - obs-studio-plugins.obs-vkcapture 132 - obs-studio-plugins.obs-pipewire-audio-capture 133 - obs-studio-plugins.obs-text-pthread 134 - ]; 135 - }; 136 - 137 - direnv = { 138 - enable = true; 139 - silent = true; 140 - nix-direnv.enable = true; 141 - }; 142 - }; 143 - 144 - dconf.settings = { 145 - "org/gnome/desktop/interface" = { 146 - color-scheme = "prefer-dark"; 147 - cursor-size = 24; 148 - cursor-theme = "phinger-cursors-light"; 149 - gtk-theme = "adw-gtk3-dark"; 150 - icon-theme = "Adwaita"; 151 - }; 152 - }; 153 - 154 - home.stateVersion = "24.11"; 155 - home.enableNixpkgsReleaseCheck = false; 156 - }
desktop/home-manager/snowy/hypr/hyprland.conf desktop/hjem-rum/snowy/hypr/hyprland.conf
desktop/home-manager/snowy/mpv/mpv.conf desktop/hjem-rum/snowy/mpv/mpv.conf
desktop/home-manager/snowy/stow.sh desktop/hjem-rum/snowy/stow.sh
-45
desktop/repos.nix
··· 1 - { 2 - inputs, 3 - system, 4 - ... 5 - }: 6 - { 7 - inherit system; 8 - 9 - master = import inputs.nixpkgs-master { 10 - inherit system; 11 - config.allowUnfree = true; 12 - }; 13 - 14 - extra-unstable = import inputs.nixpkgs-extra-unstable { 15 - inherit system; 16 - config.allowUnfree = true; 17 - config.android_sdk.accept_license = true; 18 - }; 19 - 20 - unstable = import inputs.nixpkgs-unstable { 21 - inherit system; 22 - config.allowUnfree = true; 23 - config.android_sdk.accept_license = true; 24 - }; 25 - 26 - stable = import inputs.nixpkgs-stable { 27 - inherit system; 28 - config.allowUnfree = true; 29 - config.android_sdk.accept_license = true; 30 - }; 31 - 32 - pkgs-system = inputs.nixpkgs-unstable.lib.nixosSystem; 33 - 34 - # { 35 - # modules = [ 36 - # { 37 - # nixpkgs = { 38 - # inherit system; 39 - # config.allowUnfree = true; 40 - # config.android_sdk.accept_license = true; 41 - # }; 42 - # } 43 - # ]; 44 - # }; 45 - }
+76 -26
desktop/system/configuration.nix
··· 7 7 lib, 8 8 pkgs, 9 9 repos, 10 + args, 10 11 ... 11 12 }: 12 13 ··· 14 15 imports = [ 15 16 # Include the results of the hardware scan. 16 17 ./hardware-configuration.nix 17 - ./audio.nix 18 18 ]; 19 19 20 20 qt = { ··· 24 24 }; 25 25 26 26 nix = { 27 + nixPath = [ "nixpkgs=${args.nixpkgs}" ]; 27 28 package = pkgs.lix; 28 - 29 + channel.enable = false; 29 30 settings = { 30 31 experimental-features = [ 31 32 "nix-command" ··· 37 38 ]; 38 39 auto-optimise-store = true; 39 40 use-xdg-base-directories = true; 41 + 42 + # substituters = [ 43 + # "https://cache.garnix.io?priority=3" 44 + # ]; 45 + # trusted-public-keys = [ 46 + # "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" 47 + # ]; 40 48 }; 41 49 42 50 gc = { 43 51 automatic = true; 44 52 dates = "daily"; 45 53 persistent = true; 46 - options = "--delete-older-than 1d"; 54 + options = "--delete-older-than 3d"; 47 55 }; 48 56 }; 49 57 ··· 124 132 graphics = { 125 133 enable = true; 126 134 enable32Bit = true; 127 - extraPackages = with pkgs; [ 128 - mesa 129 - libva 130 - libvdpau-va-gl 135 + # extraPackages = with pkgs; [ 136 + # # # mesa 137 + # # libva 138 + # # libvdpau-va-gl 131 139 132 - #vulkano 133 - vulkan-loader 134 - vulkan-validation-layers 140 + # # #vulkano 141 + # # vulkan-loader 142 + # # vulkan-validation-layers 135 143 136 - #opencl 137 - rocmPackages.clr.icd 138 - ]; 144 + # # #opencl 145 + # # rocmPackages.clr.icd 146 + # ]; 139 147 }; 140 148 141 149 cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; ··· 173 181 ''; 174 182 }; 175 183 176 - pam.services = { 177 - greetd.enableGnomeKeyring = true; 178 - greetd-password.enableGnomeKeyring = true; 184 + rtkit.enable = true; 185 + 186 + pam = { 187 + loginLimits = [ 188 + { 189 + domain = "snowy"; 190 + type = "-"; 191 + item = "rtprio"; 192 + value = 99; 193 + } 194 + { 195 + domain = "snowy"; 196 + type = "-"; 197 + item = "nice"; 198 + value = -20; 199 + } 200 + ]; 201 + services = { 202 + greetd.enableGnomeKeyring = true; 203 + greetd-password.enableGnomeKeyring = true; 204 + }; 179 205 }; 180 206 181 207 wrappers = { ··· 211 237 extraLocaleSettings = { 212 238 LANG = "en_US.UTF-8"; 213 239 LANGUAGE = "en_US.UTF-8"; 214 - LC_TIME = "nl_NL.UTF-8"; 240 + LC_TIME = "en_GB.UTF-8"; 215 241 # LC_ALL = "en_US.UTF-8"; 216 242 }; 217 243 }; ··· 278 304 dbus.packages = with pkgs; [ 279 305 gnome-keyring 280 306 gcr 281 - libsecret 307 + # libsecret 282 308 ]; 283 309 284 310 # open-webui = { ··· 293 319 ]; 294 320 }; 295 321 296 - lsfg-vk = { 297 - enable = true; 298 - ui.enable = true; # installs gui for configuring lsfg-vk 322 + netbird = { 323 + ui.enable = true; 324 + clients.fennec = { 325 + 326 + port = 51820; 327 + environment = { 328 + 329 + NB_MANAGEMENT_URL = "https://netbird.killuaa.dev"; 330 + # NB_SETUP_KEY_FILE = config.sops.secrets.nb_setup_key.path; 331 + }; 332 + }; 299 333 }; 300 334 335 + # lsfg-vk = { 336 + # enable = true; 337 + # ui.enable = true; # installs gui for configuring lsfg-vk 338 + # }; 339 + 301 340 # xserver.enable = true; 302 341 #xserver.displayManager.gdm.enable = true; 303 342 desktopManager.gnome.enable = true; ··· 368 407 369 408 gamescope.enable = true; 370 409 noisetorch.enable = true; 371 - adb.enable = true; 372 410 fish.enable = true; 373 411 374 412 gamemode = { ··· 431 469 432 470 fonts = { 433 471 enableDefaultPackages = true; 472 + 473 + fontconfig = { 474 + defaultFonts = { 475 + monospace = [ "Monocraft Nerd Font" ]; 476 + }; 477 + }; 478 + 434 479 packages = with pkgs; [ 435 480 noto-fonts 436 481 noto-fonts-cjk-sans ··· 438 483 noto-fonts-emoji-blob-bin 439 484 noto-fonts-lgc-plus 440 485 jetbrains-mono 486 + monocraft 441 487 ]; 442 488 }; 443 489 ··· 454 500 # dnsmasq 455 501 456 502 nh 503 + npins 457 504 glib # for gsettings 458 505 # vscodium-fhs 459 506 adwaita-icon-theme ··· 464 511 hyprpicker 465 512 hyprshot 466 513 nixd 467 - nixfmt-rfc-style 514 + nixfmt 468 515 469 516 unzip 470 517 unrar ··· 479 526 # corretto21 480 527 jdk 481 528 jdk17 529 + android-tools 482 530 483 531 gst_all_1.gstreamer 484 532 gst_all_1.gst-plugins-base ··· 518 566 helix 519 567 nano 520 568 yazi 569 + # rclone-ui 570 + rclone 521 571 522 572 bluez-tools 523 573 passt # needed for user-mode port forwarding in vm ··· 531 581 rocmPackages.rocm-smi 532 582 amdgpu_top 533 583 mangohud 534 - mangojuice 584 + # mangojuice 535 585 536 586 rofi 537 587 mako ··· 576 626 scrcpy 577 627 glogg 578 628 579 - youtube-music 580 - vesktop 629 + pear-desktop 630 + # vesktop 581 631 r2modman 582 632 #libsForQt5.xp-pen-g430-drive 583 633 # libsForQt5.xp-pen-deco-01-v2-driver
+28
home-server/default.nix
··· 1 + { 2 + args, 3 + ... 4 + }: 5 + { 6 + disabledModules = [ 7 + 8 + ]; 9 + 10 + imports = [ 11 + "${args.sources.nixpkgs-stable}/nixos/modules/profiles/minimal.nix" # Disables some options by default for a minimal installation: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/minimal.nix 12 + ./system/configuration.nix 13 + ]; 14 + 15 + nixpkgs = { 16 + # inherit system; 17 + config = { 18 + permittedInsecurePackages = [ ]; 19 + allowUnfree = true; 20 + android_sdk.accept_license = true; 21 + }; 22 + 23 + overlays = [ 24 + (final: prev: { 25 + }) 26 + ]; 27 + }; 28 + }
-49
home-server/flake.lock
··· 1 - { 2 - "nodes": { 3 - "home-manager": { 4 - "inputs": { 5 - "nixpkgs": [ 6 - "nixpkgs" 7 - ] 8 - }, 9 - "locked": { 10 - "lastModified": 1762704774, 11 - "narHash": "sha256-iodz4xQbULkHqetbPu5BCSWsVEzZiiNSv0/dzfH4XiE=", 12 - "owner": "nix-community", 13 - "repo": "home-manager", 14 - "rev": "be4a9233dd3f6104c9b0fdd3d56f953eb519a4c7", 15 - "type": "github" 16 - }, 17 - "original": { 18 - "owner": "nix-community", 19 - "ref": "master", 20 - "repo": "home-manager", 21 - "type": "github" 22 - } 23 - }, 24 - "nixpkgs": { 25 - "locked": { 26 - "lastModified": 1762596750, 27 - "narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=", 28 - "owner": "NixOS", 29 - "repo": "nixpkgs", 30 - "rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e", 31 - "type": "github" 32 - }, 33 - "original": { 34 - "owner": "NixOS", 35 - "ref": "nixos-unstable", 36 - "repo": "nixpkgs", 37 - "type": "github" 38 - } 39 - }, 40 - "root": { 41 - "inputs": { 42 - "home-manager": "home-manager", 43 - "nixpkgs": "nixpkgs" 44 - } 45 - } 46 - }, 47 - "root": "root", 48 - "version": 7 49 - }
-48
home-server/flake.nix
··· 1 - { 2 - description = "Snow's home-lab server flake"; 3 - inputs = { 4 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 5 - 6 - home-manager = { 7 - url = "github:nix-community/home-manager/master"; 8 - inputs.nixpkgs.follows = "nixpkgs"; 9 - }; 10 - }; 11 - 12 - outputs = 13 - { 14 - ... # Passes all arguments in inputs without having to specify them 15 - }@inputs: 16 - 17 - let 18 - system = "x86_64-linux"; 19 - in 20 - { 21 - nixosConfigurations.snowlab = inputs.nixpkgs.lib.nixosSystem { 22 - inherit system; 23 - 24 - # Any arugments we want our config files to have (like configuration.nix) 25 - specialArgs = { 26 - inherit inputs; 27 - }; 28 - 29 - modules = [ 30 - ./system/configuration.nix 31 - "${inputs.nixpkgs}/nixos/modules/profiles/minimal.nix" # Disables some options by default for a minimal installation: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/minimal.nix 32 - 33 - inputs.home-manager.nixosModules.home-manager 34 - { 35 - home-manager.useGlobalPkgs = true; 36 - home-manager.useUserPackages = true; 37 - home-manager.extraSpecialArgs = { 38 - inherit inputs; # Makes sure we have access to inputs in our home-manager configs. 39 - }; 40 - home-manager.users = { 41 - # All users managed by home-manager :3 42 - user = import ./home-manager/user.nix; 43 - }; 44 - } 45 - ]; 46 - }; 47 - }; 48 - }
+1 -1
home-server/justfile
··· 1 1 test-vm: 2 - nh os build-vm .#nixosConfigurations.snowlab --hostname snowlab --with-bootloader && ./result/bin/run-snowlab-vm 2 + nh os build-vm --file ../default.nix hosts.home-server --hostname snowlab -B && ./result/bin/run-snowlab-vm
+21 -22
home-server/system/configuration.nix
··· 6 6 # config, 7 7 # lib, 8 8 pkgs, 9 + args, 10 + # repos, 9 11 ... 10 12 }: 11 13 ··· 68 70 ]; 69 71 70 72 nix = { 73 + nixPath = [ "nixpkgs=${args.nixpkgs}" ]; 74 + channel.enable = false; 71 75 settings = { 72 76 experimental-features = [ 73 77 "nix-command" ··· 97 101 }; 98 102 99 103 loader = { 100 - efi.canTouchEfiVariables = true; 101 - refind.enable = true; 102 - timeout = 1; # Set timeout to null, so the refind nix options dont get overriden, its silly... 104 + # efi.canTouchEfiVariables = true; 105 + # refind.enable = false; 106 + timeout = 3; 103 107 # refind.extraConfig = '' 104 108 # timeout -1 105 109 # ''; 106 110 # Use grub so it works on both EFI and BOOT 107 111 grub = { 108 - enable = false; 109 - # timeoutStyle = "hidden"; 110 - # efiSupport = true; 111 - # splashImage = null; 112 + enable = true; 113 + device = "/dev/sda"; 112 114 }; 113 115 }; 114 116 ··· 155 157 btop 156 158 dysk 157 159 git 160 + helix 158 161 ]; 159 162 }; 160 163 161 - fonts.fontconfig.enable = false; 164 + fonts = { 165 + fontconfig.enable = false; 166 + 167 + packages = with pkgs; [ 168 + monocraft 169 + ]; 170 + }; 162 171 163 172 system = { 164 - stateVersion = "25.05"; 173 + stateVersion = "25.11"; 174 + 165 175 tools = { 166 176 nixos-version.enable = true; 167 177 nixos-rebuild.enable = true; 168 - nixos-option.enable = true; 169 178 179 + nixos-option.enable = false; 170 180 nixos-generate-config.enable = false; 171 181 nixos-install.enable = false; 172 182 nixos-build-vms.enable = false; ··· 180 190 }; 181 191 182 192 security = { 183 - # lockKernelModules = true; 193 + lockKernelModules = true; 184 194 protectKernelImage = true; 185 195 186 196 # use sudo-rs instead of sudo ··· 190 200 wheelNeedsPassword = true; 191 201 execWheelOnly = true; 192 202 }; 193 - 194 - # # Enable this if you want docker to bind to ports lower than 1024 195 - # wrappers = { 196 - # docker-rootlesskit = { 197 - # owner = "root"; 198 - # group = "root"; 199 - # capabilities = "cap_net_bind_service+ep"; 200 - # source = "${pkgs.rootlesskit}/bin/rootlesskit"; 201 - # }; 202 - # }; 203 203 }; 204 204 205 205 users = { ··· 219 219 220 220 root = { 221 221 shell = pkgs.fish; 222 - password = "goon"; 223 222 openssh.authorizedKeys.keys = [ 224 223 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL2za6psnuIMZ6FrdUehhyQlqYvy05+wv8dKER+Lctna snowy@Snowflake" 225 224 ];
+13 -11
home-server/system/hardware-configuration.nix
··· 4 4 { 5 5 config, 6 6 lib, 7 - pkgs, 8 7 modulesPath, 9 8 ... 10 9 }: 11 10 12 11 { 13 12 imports = [ 14 - (modulesPath + "/profiles/qemu-guest.nix") 13 + (modulesPath + "/installer/scan/not-detected.nix") 15 14 ]; 16 15 17 16 boot.initrd.availableKernelModules = [ ··· 26 25 boot.extraModulePackages = [ ]; 27 26 28 27 fileSystems."/" = { 29 - device = "/dev/disk/by-uuid/b435993e-0760-44ba-afa7-ead509b87e62"; 28 + device = "/dev/disk/by-uuid/2803c2dc-5ecf-436d-8c79-930ce3fbf4bb"; 30 29 fsType = "ext4"; 31 30 }; 32 31 32 + # fileSystems."/boot" = { 33 + # device = "/dev/disk/by-uuid/12F6-1CE4"; 34 + # fsType = "vfat"; 35 + # options = [ 36 + # "fmask=0022" 37 + # "dmask=0022" 38 + # ]; 39 + # }; 40 + 33 41 fileSystems."/proc" = { 34 42 device = "proc"; 35 43 fsType = "proc"; 36 - }; 37 - 38 - fileSystems."/boot" = { 39 - device = "/dev/disk/by-uuid/67AC-7FCE"; 40 - fsType = "vfat"; 41 44 options = [ 42 - "fmask=0077" 43 - "dmask=0077" 45 + "hidepid=2" 44 46 ]; 45 47 }; 46 48 ··· 54 56 # networking.interfaces.ens3.useDHCP = lib.mkDefault true; 55 57 56 58 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 57 - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 59 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 58 60 }
+56
lib/default.nix
··· 1 + { }: 2 + 3 + { 4 + gen_pins = ( 5 + { 6 + lib, 7 + sources, 8 + excl ? [ ], 9 + }: 10 + (lib.mapAttrs ( 11 + name: value: 12 + if builtins.elem name excl then 13 + (import value) 14 + else 15 + (import sources.flake-compat { 16 + src = builtins.path { 17 + inherit name; 18 + path = value; 19 + }; 20 + }).outputs 21 + ) sources) 22 + ); 23 + 24 + # nixosHost = ( 25 + # modules: arguments: 26 + # (lib.fix ( 27 + # self: 28 + # nixosSystem { 29 + # inherit modules; 30 + # specialArgs = 31 + # let 32 + # args = arguments // { 33 + # mod_self = self; 34 + # }; 35 + # in 36 + # args; 37 + # } 38 + # )) 39 + # ); 40 + 41 + nixosHost = 42 + { 43 + nixpkgs, 44 + specialArgs, 45 + system, 46 + modules, 47 + lib ? import "${nixpkgs}/lib", 48 + }: 49 + import "${nixpkgs}/nixos/lib/eval-config.nix" { 50 + inherit specialArgs; 51 + inherit system; 52 + inherit modules; 53 + inherit lib; 54 + }; 55 + 56 + }
+249
npins/default.nix
··· 1 + /* 2 + This file is provided under the MIT licence: 3 + 4 + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 + 6 + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 + 8 + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 + */ 10 + # Generated by npins. Do not modify; will be overwritten regularly 11 + let 12 + # Backwards-compatibly make something that previously didn't take any arguments take some 13 + # The function must return an attrset, and will unfortunately be eagerly evaluated 14 + # Same thing, but it catches eval errors on the default argument so that one may still call it with other arguments 15 + mkFunctor = 16 + fn: 17 + let 18 + e = builtins.tryEval (fn { }); 19 + in 20 + (if e.success then e.value else { error = fn { }; }) // { __functor = _self: fn; }; 21 + 22 + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 23 + range = 24 + first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); 25 + 26 + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 27 + stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); 28 + 29 + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 30 + stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); 31 + concatStrings = builtins.concatStringsSep ""; 32 + 33 + # If the environment variable NPINS_OVERRIDE_${name} is set, then use 34 + # the path directly as opposed to the fetched source. 35 + # (Taken from Niv for compatibility) 36 + mayOverride = 37 + name: path: 38 + let 39 + envVarName = "NPINS_OVERRIDE_${saneName}"; 40 + saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; 41 + ersatz = builtins.getEnv envVarName; 42 + in 43 + if ersatz == "" then 44 + path 45 + else 46 + # this turns the string into an actual Nix path (for both absolute and 47 + # relative paths) 48 + builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( 49 + if builtins.substring 0 1 ersatz == "/" then 50 + /. + ersatz 51 + else 52 + /. + builtins.getEnv "PWD" + "/${ersatz}" 53 + ); 54 + 55 + mkSource = 56 + name: spec: 57 + { 58 + pkgs ? null, 59 + }: 60 + assert spec ? type; 61 + let 62 + # Unify across builtin and pkgs fetchers. 63 + # `fetchGit` requires a wrapper because of slight API differences. 64 + fetchers = 65 + if pkgs == null then 66 + { 67 + inherit (builtins) fetchTarball fetchurl; 68 + # For some fucking reason, fetchGit has a different signature than the other builtin fetchers … 69 + fetchGit = args: (builtins.fetchGit args).outPath; 70 + } 71 + else 72 + { 73 + fetchTarball = 74 + { 75 + url, 76 + sha256, 77 + }: 78 + pkgs.fetchzip { 79 + inherit url sha256; 80 + extension = "tar"; 81 + }; 82 + inherit (pkgs) fetchurl; 83 + fetchGit = 84 + { 85 + url, 86 + submodules, 87 + rev, 88 + name, 89 + narHash, 90 + }: 91 + pkgs.fetchgit { 92 + inherit url rev name; 93 + fetchSubmodules = submodules; 94 + hash = narHash; 95 + }; 96 + }; 97 + 98 + # Dispatch to the correct code path based on the type 99 + path = 100 + if spec.type == "Git" then 101 + mkGitSource fetchers spec 102 + else if spec.type == "GitRelease" then 103 + mkGitSource fetchers spec 104 + else if spec.type == "PyPi" then 105 + mkPyPiSource fetchers spec 106 + else if spec.type == "Channel" then 107 + mkChannelSource fetchers spec 108 + else if spec.type == "Tarball" then 109 + mkTarballSource fetchers spec 110 + else if spec.type == "Container" then 111 + mkContainerSource pkgs spec 112 + else 113 + builtins.throw "Unknown source type ${spec.type}"; 114 + in 115 + spec // { outPath = mayOverride name path; }; 116 + 117 + mkGitSource = 118 + { 119 + fetchTarball, 120 + fetchGit, 121 + ... 122 + }: 123 + { 124 + repository, 125 + revision, 126 + url ? null, 127 + submodules, 128 + hash, 129 + ... 130 + }: 131 + assert repository ? type; 132 + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository 133 + # In the latter case, there we will always be an url to the tarball 134 + if url != null && !submodules then 135 + fetchTarball { 136 + inherit url; 137 + sha256 = hash; 138 + } 139 + else 140 + let 141 + url = 142 + if repository.type == "Git" then 143 + repository.url 144 + else if repository.type == "GitHub" then 145 + "https://github.com/${repository.owner}/${repository.repo}.git" 146 + else if repository.type == "GitLab" then 147 + "${repository.server}/${repository.repo_path}.git" 148 + else if repository.type == "Forgejo" then 149 + "${repository.server}/${repository.owner}/${repository.repo}.git" 150 + else 151 + throw "Unrecognized repository type ${repository.type}"; 152 + urlToName = 153 + url: rev: 154 + let 155 + matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; 156 + 157 + short = builtins.substring 0 7 rev; 158 + 159 + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; 160 + in 161 + "${if matched == null then "source" else builtins.head matched}${appendShort}"; 162 + name = urlToName url revision; 163 + in 164 + fetchGit { 165 + rev = revision; 166 + narHash = hash; 167 + 168 + inherit name submodules url; 169 + }; 170 + 171 + mkPyPiSource = 172 + { fetchurl, ... }: 173 + { 174 + url, 175 + hash, 176 + ... 177 + }: 178 + fetchurl { 179 + inherit url; 180 + sha256 = hash; 181 + }; 182 + 183 + mkChannelSource = 184 + { fetchTarball, ... }: 185 + { 186 + url, 187 + hash, 188 + ... 189 + }: 190 + fetchTarball { 191 + inherit url; 192 + sha256 = hash; 193 + }; 194 + 195 + mkTarballSource = 196 + { fetchTarball, ... }: 197 + { 198 + url, 199 + locked_url ? url, 200 + hash, 201 + ... 202 + }: 203 + fetchTarball { 204 + url = locked_url; 205 + sha256 = hash; 206 + }; 207 + 208 + mkContainerSource = 209 + pkgs: 210 + { 211 + image_name, 212 + image_tag, 213 + image_digest, 214 + ... 215 + }: 216 + if pkgs == null then 217 + builtins.throw "container sources require passing in a Nixpkgs value: https://github.com/andir/npins/blob/master/README.md#using-the-nixpkgs-fetchers" 218 + else 219 + pkgs.dockerTools.pullImage { 220 + imageName = image_name; 221 + imageDigest = image_digest; 222 + finalImageTag = image_tag; 223 + }; 224 + in 225 + mkFunctor ( 226 + { 227 + input ? ./sources.json, 228 + }: 229 + let 230 + data = 231 + if builtins.isPath input then 232 + # while `readFile` will throw an error anyways if the path doesn't exist, 233 + # we still need to check beforehand because *our* error can be caught but not the one from the builtin 234 + # *piegames sighs* 235 + if builtins.pathExists input then 236 + builtins.fromJSON (builtins.readFile input) 237 + else 238 + throw "Input path ${toString input} does not exist" 239 + else if builtins.isAttrs input then 240 + input 241 + else 242 + throw "Unsupported input type ${builtins.typeOf input}, must be a path or an attrset"; 243 + version = data.version; 244 + in 245 + if version == 7 then 246 + builtins.mapAttrs (name: spec: mkFunctor (mkSource name spec)) data.pins 247 + else 248 + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" 249 + )
+136
npins/sources.json
··· 1 + { 2 + "pins": { 3 + "flake-compat": { 4 + "type": "Git", 5 + "repository": { 6 + "type": "Forgejo", 7 + "server": "https://git.lix.systems/", 8 + "owner": "lix-project", 9 + "repo": "flake-compat" 10 + }, 11 + "branch": "main", 12 + "submodules": false, 13 + "revision": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", 14 + "url": "https://git.lix.systems/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz", 15 + "hash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=" 16 + }, 17 + "hjem": { 18 + "type": "Git", 19 + "repository": { 20 + "type": "GitHub", 21 + "owner": "feel-co", 22 + "repo": "hjem" 23 + }, 24 + "branch": "main", 25 + "submodules": false, 26 + "revision": "8539013044624a257e8da370069107aea148e985", 27 + "url": "https://github.com/feel-co/hjem/archive/8539013044624a257e8da370069107aea148e985.tar.gz", 28 + "hash": "sha256-I2zxtEafZbFbqXe71rjqwVeTDv8SIVLaSzQd39SwfwM=" 29 + }, 30 + "hjem-rum": { 31 + "type": "Git", 32 + "repository": { 33 + "type": "GitHub", 34 + "owner": "snugnug", 35 + "repo": "hjem-rum" 36 + }, 37 + "branch": "main", 38 + "submodules": false, 39 + "revision": "edac54b7d57ad72cc4b124da2f44e7b2e584f3c6", 40 + "url": "https://github.com/snugnug/hjem-rum/archive/edac54b7d57ad72cc4b124da2f44e7b2e584f3c6.tar.gz", 41 + "hash": "sha256-P+59TbVusYqdx2Jt2liwvQ+hslUzU6M1ezRDy6c66Tc=" 42 + }, 43 + "nix-gaming-edge": { 44 + "type": "Git", 45 + "repository": { 46 + "type": "GitHub", 47 + "owner": "MrSn0wy", 48 + "repo": "nix-gaming-edge" 49 + }, 50 + "branch": "nightly", 51 + "submodules": false, 52 + "revision": "cbf0780954e15ef909140773eeb92370237655eb", 53 + "url": "https://github.com/MrSn0wy/nix-gaming-edge/archive/cbf0780954e15ef909140773eeb92370237655eb.tar.gz", 54 + "hash": "sha256-o6VHnCp6E8aFkEF7jTAnw/cBJ3T3z1eNNTUhDF6l7AY=" 55 + }, 56 + "nix-index-database": { 57 + "type": "Git", 58 + "repository": { 59 + "type": "GitHub", 60 + "owner": "nix-community", 61 + "repo": "nix-index-database" 62 + }, 63 + "branch": "main", 64 + "submodules": false, 65 + "revision": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", 66 + "url": "https://github.com/nix-community/nix-index-database/archive/82befcf7dc77c909b0f2a09f5da910ec95c5b78f.tar.gz", 67 + "hash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=" 68 + }, 69 + "nixpkgs-stable": { 70 + "type": "Git", 71 + "repository": { 72 + "type": "GitHub", 73 + "owner": "NixOS", 74 + "repo": "nixpkgs" 75 + }, 76 + "branch": "nixos-25.11", 77 + "submodules": false, 78 + "revision": "2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a", 79 + "url": "https://github.com/NixOS/nixpkgs/archive/2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a.tar.gz", 80 + "hash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=" 81 + }, 82 + "nixpkgs-unstable": { 83 + "type": "Git", 84 + "repository": { 85 + "type": "GitHub", 86 + "owner": "NixOS", 87 + "repo": "nixpkgs" 88 + }, 89 + "branch": "nixos-unstable", 90 + "submodules": false, 91 + "revision": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", 92 + "url": "https://github.com/NixOS/nixpkgs/archive/ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38.tar.gz", 93 + "hash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=" 94 + }, 95 + "sops-nix": { 96 + "type": "Git", 97 + "repository": { 98 + "type": "GitHub", 99 + "owner": "Mic92", 100 + "repo": "sops-nix" 101 + }, 102 + "branch": "master", 103 + "submodules": false, 104 + "revision": "691b8b6713855d0fe463993867291c158472fc6f", 105 + "url": "https://github.com/Mic92/sops-nix/archive/691b8b6713855d0fe463993867291c158472fc6f.tar.gz", 106 + "hash": "sha256-jJqlW8A3OZ5tYbXphF7U8P8g/3Cn8PPwPa4YlJ/9agg=" 107 + }, 108 + "wire": { 109 + "type": "Git", 110 + "repository": { 111 + "type": "GitHub", 112 + "owner": "mrshmllow", 113 + "repo": "wire" 114 + }, 115 + "branch": "stable", 116 + "submodules": false, 117 + "revision": "53dad75b2503b8d9bb09ea3fbd9d87a0ab14bcf2", 118 + "url": "https://github.com/mrshmllow/wire/archive/53dad75b2503b8d9bb09ea3fbd9d87a0ab14bcf2.tar.gz", 119 + "hash": "sha256-eIi3o3TiYFlgk831lkWilNw9vTrO26PNaNwbG2UAF60=" 120 + }, 121 + "zen-browser": { 122 + "type": "Git", 123 + "repository": { 124 + "type": "GitHub", 125 + "owner": "0xc000022070", 126 + "repo": "zen-browser-flake" 127 + }, 128 + "branch": "main", 129 + "submodules": false, 130 + "revision": "e862bd9ebbcd3265f1da6d1bdfe37d8732029d08", 131 + "url": "https://github.com/0xc000022070/zen-browser-flake/archive/e862bd9ebbcd3265f1da6d1bdfe37d8732029d08.tar.gz", 132 + "hash": "sha256-D4+/DD5/dhSihHxbSJnY9hi/3QiYnfqWT29ZpQRf1xw=" 133 + } 134 + }, 135 + "version": 7 136 + }
+18 -10
server/flake.nix
··· 17 17 { 18 18 self, 19 19 nixpkgs, 20 - home-manager, 21 20 ... 22 21 }@inputs: 23 22 ··· 33 32 }; 34 33 35 34 modules = [ 36 - ./system/configuration.nix 37 - ./containers 38 - ./services 39 - "${nixpkgs}/nixos/modules/profiles/minimal.nix" 40 - 41 - # Nix secrets hehe :3 42 - inputs.sops-nix.nixosModules.sops 43 - 44 - home-manager.nixosModules.home-manager 45 35 { 36 + nixpkgs = { 37 + inherit system; 38 + config.allowUnfree = true; 39 + overlays = [ 40 + (final: prev: { 41 + }) 42 + ]; 43 + }; 44 + 46 45 home-manager.useGlobalPkgs = true; 47 46 home-manager.useUserPackages = true; 48 47 home-manager.extraSpecialArgs = { inherit inputs; }; ··· 50 49 snow = import ./home-manager/snow.nix; 51 50 }; 52 51 } 52 + 53 + ./system/configuration.nix 54 + ./containers 55 + ./services 56 + "${nixpkgs}/nixos/modules/profiles/minimal.nix" 57 + 58 + # Nix secrets hehe :3 59 + inputs.sops-nix.nixosModules.sops 60 + inputs.home-manager.nixosModules.home-manager 53 61 ]; 54 62 }; 55 63 };
+2
server/home-manager/apps/fish.nix
··· 18 18 19 19 logboot = "journalctl --boot=-1 --reverse"; 20 20 listgens = "sudo nix-env -p /nix/var/nix/profiles/system --list-generations"; 21 + 22 + img = "chafa --format sixels"; 21 23 }; 22 24 23 25 shellInit = ''
+2
server/home-manager/snow.nix
··· 17 17 devenv 18 18 # yazi 19 19 ctop 20 + chafa 21 + waypipe 20 22 ]; 21 23 }; 22 24
+41 -4
server/services/caddy.nix
··· 15 15 ''; 16 16 17 17 extraConfig = '' 18 - mrsnowy.dev, mail.mrsnowy.dev, fpps4.net, www.paradijs-in-hongarije.nl, paradijs-in-hongarije.nl, prowebservice.nl, smarty.nl, www.zendojaku.nl, zendojaku.nl { 18 + mail.mrsnowy.dev, fpps4.net, www.paradijs-in-hongarije.nl, paradijs-in-hongarije.nl, smarty.nl, www.zendojaku.nl, zendojaku.nl { 19 19 reverse_proxy https://${hestia_ip} { 20 20 transport http { 21 21 tls_insecure_skip_verify ··· 23 23 } 24 24 } 25 25 26 + mrsnowy.dev { 27 + root * /var/www/mrsnowy.dev/ 28 + 29 + # Regex for allowing these files to be displayed in the browser 30 + @inlineFiles { 31 + # path *.pub *.gpg 32 + path_regexp ^.*\.(pub|gpg)$ 33 + } 34 + 35 + header @inlineFiles { 36 + Content-Type text/plain 37 + # Content-Disposition inline 38 + } 39 + 40 + file_server browse { 41 + index index.html 42 + } 43 + } 44 + 45 + molly.mrsnowy.dev, rat.mrsnowy.dev { 46 + root * /var/www/rat.mrsnowy.dev/ 47 + 48 + file_server browse { 49 + index index.html 50 + } 51 + } 52 + 53 + silly.mrsnowy.dev { 54 + root * /var/www/silly.mrsnowy.dev/ 55 + file_server browse { 56 + index index.html 57 + } 58 + } 59 + 26 60 hestia.mrsnowy.dev { 27 61 reverse_proxy https://${hestia_ip}:8083 { 28 62 transport http { ··· 71 105 72 106 ente.mrsnowy.dev { 73 107 reverse_proxy :${toString config.ports.ente.web} 74 - header { 75 - Access-Control-Allow-Origin https://minio.ente.mrsnowy.dev 76 - } 108 + # header { 109 + # Access-Control-Allow-Origin https://s3.mrsnowy.dev 110 + # } 77 111 } 78 112 79 113 api.ente.mrsnowy.dev { ··· 122 156 123 157 *.s3.mrsnowy.dev, s3.mrsnowy.dev { 124 158 reverse_proxy :${toString config.ports.garage.s3_api} 159 + # header { 160 + # Access-Control-Allow-Origin * 161 + # } 125 162 } 126 163 ''; 127 164 };
+16
server/services/random.nix
··· 57 57 settings.options.urAccepted = -1; 58 58 }; 59 59 60 + # ntfy-sh = { 61 + # enable = true; 62 + # settings = { 63 + # base-url = "https://ntfy.killuaa.dev"; 64 + # listen-http = ":2586"; 65 + # behind-proxy = true; 66 + # }; 67 + # }; 68 + 69 + # mollysocket = { 70 + # enable = true; 71 + # settings = { 72 + # host = "0.0.0.0"; 73 + # }; 74 + # }; 75 + 60 76 tailscale.enable = true; 61 77 }; 62 78 }
+1
server/system/configuration.nix
··· 223 223 shell = pkgs.fish; 224 224 openssh.authorizedKeys.keys = [ 225 225 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL2za6psnuIMZ6FrdUehhyQlqYvy05+wv8dKER+Lctna snowy@Snowflake" 226 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOPNLNK5h3nZ2UQO8ElWTA7E0j1iC8FlJFDudo6QgfWC u0_a231@localhost" 226 227 ]; 227 228 }; 228 229 # file-backup = {
+8
server/system/network.nix
··· 94 94 7777 95 95 8888 96 96 97 + # VALHEIM 98 + 2456 99 + 2457 100 + 97 101 # Steam 98 102 27015 99 103 27016 ··· 116 120 117 121 # Satisfactory && Astroneer 118 122 7777 123 + 124 + # VALHEIM 125 + 2456 126 + 2457 119 127 120 128 # Steam 121 129 27015