Compare commits

...

2 Commits

17 changed files with 169 additions and 84 deletions

151
flake.lock generated
View File

@ -272,7 +272,6 @@
}
},
"flake-compat_7": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
@ -326,6 +325,28 @@
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_4"
@ -412,11 +433,11 @@
]
},
"locked": {
"lastModified": 1735882644,
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
"lastModified": 1737465171,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
@ -536,11 +557,11 @@
]
},
"locked": {
"lastModified": 1740234812,
"narHash": "sha256-TMPM8TBbS0d4e5+3TofgoF+pwbXwMfKzWxwksoIEX1E=",
"lastModified": 1740624780,
"narHash": "sha256-8TP61AI3QBQsjzVUQFIV8NoB5nbYfJB3iHczhBikDkU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "34d524f3edcf3a04c00ad2c09c24ec9d35d937f9",
"rev": "b8869e4ead721bbd4f0d6b927e8395705d4f16e6",
"type": "github"
},
"original": {
@ -669,11 +690,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1740169613,
"narHash": "sha256-3bTa0nEDQTsfi+aDiGHikthn6dMuVOTCtsS0cvDV6Uw=",
"lastModified": 1740614171,
"narHash": "sha256-6fWCR3TLTK39XNy6SDsW4L78VsmwIwi1sO5B8lq24vY=",
"ref": "refs/heads/main",
"rev": "f4b148df1e2d8edc96bd878a4cfde32ca6515ac8",
"revCount": 5836,
"rev": "d5920bc5da75b8eaf3476bc814bd46d225709788",
"revCount": 5849,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@ -1028,11 +1049,11 @@
]
},
"locked": {
"lastModified": 1739676768,
"narHash": "sha256-U1HQ7nzhJyVVXUgjU028UCkbLQLEIkg42+G7iIiBmlU=",
"lastModified": 1740281615,
"narHash": "sha256-dZWcbAQ1sF8oVv+zjSKkPVY0ebwENQEkz5vc6muXbKY=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "ae15068e79e22b76c344f0d7f8aed1bb1c5b0b63",
"rev": "465792533d03e6bb9dc849d58ab9d5e31fac9023",
"type": "github"
},
"original": {
@ -1050,11 +1071,11 @@
]
},
"locked": {
"lastModified": 1740185577,
"narHash": "sha256-u0BtoG4wM1dUKVpucP0igJ5oDcX/3cHRMuH0/MiSjGE=",
"lastModified": 1740617752,
"narHash": "sha256-OTNAtsRtkojQ9qCwPNCjBOTJMAIJLaYk4Ti83IXYSBM=",
"owner": "Silveere",
"repo": "nix-minecraft",
"rev": "0a137517fe1cb778631f405aa21b35b6edf41062",
"rev": "68b45fd2540ec02ddf696f32e741a536b9cacf95",
"type": "github"
},
"original": {
@ -1073,11 +1094,11 @@
]
},
"locked": {
"lastModified": 1740188624,
"narHash": "sha256-z5G/JoTGICMdhxkN+sztsrcCD7vRFHIJiw/fchHX580=",
"lastModified": 1740620959,
"narHash": "sha256-2yp4ipvKG1cZf4OJYelOiDMtZ4qxGn4PPFXlpiVMcuo=",
"owner": "infinidoge",
"repo": "nix-minecraft",
"rev": "8c0d05c3ce359b0d08226298ff7e4200486cbed3",
"rev": "91ee2f20fe2500359ba04f6ca86d39e950345d1f",
"type": "github"
},
"original": {
@ -1094,11 +1115,11 @@
]
},
"locked": {
"lastModified": 1740046902,
"narHash": "sha256-Xbhz8eEqBmNpvqaGFbF5JopmfNJccWUr8eExtU/iGX4=",
"lastModified": 1740567864,
"narHash": "sha256-eTS2wrC1jKR6PKXC9jZqQy5PwqbIOBLSLF3dwLiFJ8M=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "c4f6ae89468939d9fcf1a317c062cf5dd02004ea",
"rev": "1f40b43d01626ce994eb47150afa0d7215f396ca",
"type": "github"
},
"original": {
@ -1192,11 +1213,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1740019556,
"narHash": "sha256-vn285HxnnlHLWnv59Og7muqECNMS33mWLM14soFIv2g=",
"lastModified": 1740547748,
"narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dad564433178067be1fbdfcce23b546254b6d641",
"rev": "3a05eebede89661660945da1f151959900903b6a",
"type": "github"
},
"original": {
@ -1208,11 +1229,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1739923778,
"narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=",
"lastModified": 1740463929,
"narHash": "sha256-4Xhu/3aUdCKeLfdteEHMegx5ooKQvwPHNkOgNCXQrvc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1",
"rev": "5d7db4668d7a0c6cc5fc8cf6ef33b008b2b1ed8b",
"type": "github"
},
"original": {
@ -1222,6 +1243,29 @@
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"stylix",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1740408283,
"narHash": "sha256-2xECnhgF3MU9YjmvOkrRp8wRFo2OjjewgCtlfckhL5s=",
"owner": "nix-community",
"repo": "NUR",
"rev": "496a4a11162bdffb9a7b258942de138873f019f7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -1296,7 +1340,7 @@
"rust-overlay": "rust-overlay_2",
"stylix": "stylix",
"systems": "systems_7",
"treefmt-nix": "treefmt-nix"
"treefmt-nix": "treefmt-nix_2"
}
},
"rust-overlay": {
@ -1327,11 +1371,11 @@
]
},
"locked": {
"lastModified": 1740191166,
"narHash": "sha256-WqRxO1Afx8jPYG4CKwkvDFWFvDLCwCd4mxb97hFGYPg=",
"lastModified": 1740623427,
"narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "74a3fb71b0cc67376ab9e7c31abcd68c813fc226",
"rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
"type": "github"
},
"original": {
@ -1359,6 +1403,7 @@
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
"systems": "systems_6",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
@ -1367,11 +1412,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1740167553,
"narHash": "sha256-/tbaAA3PUfPbmOqxztKQKITBnJmgtqh/mVG6ygwpTXU=",
"lastModified": 1740644467,
"narHash": "sha256-i2ArXwncE2OmneLBllo5OlpLB2UsXU5JX+T+7or5OX4=",
"owner": "danth",
"repo": "stylix",
"rev": "917e07af1451d7765be57c8b31bb3372c7b821a7",
"rev": "e7c09d206680e6fe6771e1ac9a83515313feaf95",
"type": "github"
},
"original": {
@ -1522,11 +1567,11 @@
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1737565458,
"narHash": "sha256-y+9cvOA6BLKT0WfebDsyUpUa/YxKow9hTjBp6HpQv68=",
"lastModified": 1740351358,
"narHash": "sha256-Hdk850xgAd3DL8KX0AbyU7tC834d3Lej1jOo3duWiOA=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "ae31625ba47aeaa4bf6a98cf11a8d4886f9463d9",
"rev": "a1bc2bd89e693e7e3f5764cfe8114e2ae150e184",
"type": "github"
},
"original": {
@ -1538,11 +1583,11 @@
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1735737224,
"narHash": "sha256-FO2hRBkZsjlIRqzNHCPc/52yxg11kHGA8MEtSun9RwE=",
"lastModified": 1740272597,
"narHash": "sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "aead506a9930c717ebf81cc83a2126e9ca08fa64",
"rev": "b6c7f46c8718cc484f2db8b485b06e2a98304cd0",
"type": "github"
},
"original": {
@ -1568,6 +1613,28 @@
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"

View File

@ -6,7 +6,7 @@
inputs,
self,
...
}: let
} @ flakeArgs: let
cfg = config.nixfiles.systems;
inherit
(lib)
@ -227,14 +227,22 @@ in {
++ lib.optional config.wsl wslModule;
extraConfig = {
inherit (config) system modules;
# TODO get rid of specialArgs and pass things as a module
specialArgs = let
inherit (self) outputs;
in {
inherit inputs outputs;
inherit (outerConfig.nixfiles) vars;
specialArgs = {
# TODO this is temporary, i prefer to not use specialArgs because
# it can't be exported. these are still better than my clunky
# "vars" arg that i would arbitrarily add things to.
#
# we need to merge all of the module args like this because the
# module evaluator only calls each module with the args it asks
# for, but we explicitly want *all* args to be made available.
flakeArgs = outerConfig._module.args // outerConfig._module.specialArgs // flakeArgs;
# still unsure of what the best way to deal with this is. i can
# probably pass this submodule's args for a fairly clean way to
# pass it, but i'd want to refactor it because config.nixpkgs and
# config.home-manager.input are named inconsistently
inherit (config) nixpkgs;
inherit (config.home-manager) input;
home-manager = config.home-manager.input;
};
};
result = config.nixpkgs.lib.nixosSystem config.extraConfig;

View File

@ -19,7 +19,7 @@
rofi = "${pkgs.rofi-wayland}/bin/rofi";
notifydaemon = "${pkgs.dunst}/bin/dunst";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
polkit-agent = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
polkit-agent = "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1";
grimblast = "${inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast}/bin/grimblast";
swayidle = "${pkgs.swayidle}/bin/swayidle";
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
@ -126,7 +126,7 @@ in {
nixfiles.common.wm.enable = true;
home.packages = with pkgs; [
kitty
dolphin
kdePackages.dolphin
rofi-wayland
wev
dunst

View File

@ -2,9 +2,11 @@
pkgs,
config,
lib,
vars,
flakeConfig,
...
}: {
}: let
inherit (flakeConfig.nixfiles) vars;
in {
config = {
networking.hostName = "nixos-wsl";

View File

@ -6,7 +6,6 @@
config,
lib,
pkgs,
inputs,
...
}: {
imports = [

View File

@ -6,7 +6,6 @@
config,
lib,
pkgs,
vars,
...
}: {
imports = [

View File

@ -47,7 +47,7 @@
'';
desktopWrapper = pkgs.writeShellScript "bootnext-desktop-wrapper" ''
if ${pkgs.libsForQt5.kdialog}/bin/kdialog --warningyesno "Are you sure you want to reboot?" ; then
if ${pkgs.kdePackages.kdialog}/bin/kdialog --warningyesno "Are you sure you want to reboot?" ; then
${bootNextScript}/bin/bootnext "$@"
reboot
fi

View File

@ -3,10 +3,11 @@
lib,
config,
options,
inputs,
flakeArgs,
nixpkgs,
...
}: let
inherit (flakeArgs) inputs;
cfg = config.nixfiles.common.nix;
in {
options.nixfiles.common.nix = {

View File

@ -3,9 +3,9 @@
config,
lib,
options,
flakeArgs,
nixpkgs,
home-manager,
inputs,
utils,
...
} @ args:
@ -14,8 +14,15 @@
# inputs/outputs/overlays/etc into scope. this might even make nixfiles
# portable (it still shouldn't be imported by other flakes probably)
let
inherit (flakeArgs) inputs;
cfg = config.nixfiles;
flakeType = cfg.lib.types.flake;
mkReadOnlyOption = {...} @ args:
lib.mkOption ({
readOnly = true;
}
// args);
in {
imports = [
./common
@ -35,7 +42,15 @@ in {
inputs.lanzaboote.nixosModules.lanzaboote
./stylix.nix # imports inputs.stylix
];
config = {};
config = {
_module.args.flakeConfig = flakeArgs.config;
};
options.debug = {
args = mkReadOnlyOption {
description = "all module args";
default = config._module.args // config._module.specialArgs // args;
};
};
options.nixfiles = {
meta.wayland = lib.mkOption {
description = "Whether to prefer wayland applications and configuration";
@ -44,12 +59,6 @@ in {
type = lib.types.bool;
};
utils = lib.mkOption {
description = "nixpkgs `utils` argument passthrough";
default = utils;
readOnly = true;
};
workarounds.nvidiaPrimary = lib.mkOption {
description = "Whether to enable workarounds for NVIDIA as the primary GPU";
default = false;

View File

@ -2,11 +2,12 @@
config,
lib,
pkgs,
inputs,
flakeArgs,
...
}: let
cfg = config.nixfiles.hardware.sound;
inherit (flakeArgs) inputs;
inherit (lib) optionals mkEnableOption mkIf mkDefault;
cfg = config.nixfiles.hardware.sound;
in {
# Enable sound.
# sound.enable = true;

View File

@ -2,9 +2,11 @@
config,
lib,
pkgs,
inputs,
flakeArgs,
...
}: {
}: let
inherit (flakeArgs) inputs;
in {
imports = [
inputs.nix-minecraft.nixosModules.minecraft-servers
];

View File

@ -1,11 +1,10 @@
{
pkgs,
config,
lib,
inputs,
nixpkgs,
flakeArgs,
...
}: let
inherit (flakeArgs) inputs;
p5 = config.services.xserver.desktopManager.plasma5.enable;
p6 = config.services.desktopManager.plasma6.enable;

View File

@ -2,7 +2,6 @@
config,
lib,
pkgs,
inputs,
...
}: let
cfg = config.nixfiles.packageSets.gaming;

View File

@ -2,9 +2,6 @@
config,
lib,
pkgs,
options,
inputs,
outputs,
...
} @ args: let
cfg = config.nixfiles.profile.base;

View File

@ -2,10 +2,10 @@
config,
lib,
pkgs,
outputs,
vars,
flakeConfig,
...
} @ args: let
inherit (flakeConfig.nixfiles) vars;
cfg = config.nixfiles.programs.adb;
in {
options.nixfiles.programs.adb = {

View File

@ -2,9 +2,10 @@
lib,
pkgs,
config,
inputs,
flakeArgs,
...
}: let
inherit (flakeArgs) inputs;
cfg = config.nixfiles.sessions.hyprland;
flake-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
flake-portal = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
@ -86,13 +87,12 @@ in {
environment.systemPackages = with pkgs; [
kitty
dunst
polkit-kde-agent
kdePackages.polkit-kde-agent-1
eww
hyprpaper
rofi
hyprpicker
udiskie
polkit-kde-agent
];
};
}

View File

@ -2,9 +2,11 @@
pkgs,
config,
lib,
inputs,
flakeArgs,
...
} @ args: {
} @ args: let
inherit (flakeArgs) inputs;
in {
imports = [inputs.stylix.nixosModules.stylix];
config = {