Compare commits

...

3 commits

4 changed files with 192 additions and 7 deletions

View file

@ -1,8 +1,17 @@
{
config,
options,
pkgs,
pkgs-unstable,
optnix,
home-manager,
...
}: {
}: let
optnixLib = optnix.mkLib pkgs;
in {
imports = [
optnix.nixosModules.optnix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.memtest86.enable = true;
@ -68,6 +77,30 @@
# does this add river to sddm menu?
programs.river.enable = true;
programs.optnix = {
enable = true;
settings = {
scopes = {
home-manager = {
description = "home-manager Configuration for the local machine";
options-list-file = optnixLib.hm.mkOptionsListFromHMSource {
inherit home-manager;
};
evaluator = "nix eval ~/src/nix#nixosConfigurations.${config.networking.hostName}.config.home-manager.users.khais.{{ .Option }}";
};
nixos = {
description = "NixOS Configuration for the local machine";
options-list-file =
optnixLib.mkOptionsList
{
inherit options;
};
evaluator = "nix eval ~/src/nix#nixosConfigurations.${config.networking.hostName}.config.{{ .Option }}";
};
};
};
};
# needed to set here to have correct permissions
programs.k3b.enable = true;

149
flake.lock generated
View file

@ -233,6 +233,22 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@ -346,6 +362,24 @@
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
@ -594,6 +628,27 @@
"type": "github"
}
},
"nix-options-doc": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_7",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1742115705,
"narHash": "sha256-RfXwJPWBoWswIU68+y/XZfTWtFHd/fK14bKvOlRmfPo=",
"owner": "Thunderbottom",
"repo": "nix-options-doc",
"rev": "2caa4b5756a8666d65d70122f413e295f56886e7",
"type": "github"
},
"original": {
"owner": "Thunderbottom",
"ref": "v0.2.0",
"repo": "nix-options-doc",
"type": "github"
}
},
"nixos-06cb-009a-fingerprint-sensor": {
"inputs": {
"nixpkgs": "nixpkgs_4"
@ -750,6 +805,38 @@
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1740695751,
"narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1759070547,
"narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "647e5c14cbd5067f44ac86b74f014962df460840",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
@ -848,9 +935,29 @@
"type": "github"
}
},
"optnix": {
"inputs": {
"flake-compat": "flake-compat_3",
"nix-options-doc": "nix-options-doc",
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1759503843,
"narHash": "sha256-kffdCHqqORAAjmWgZ0HpFxDKaPhiaHXAOsGbytpoXIs=",
"owner": "water-sucks",
"repo": "optnix",
"rev": "c23221fc3bbf5f3257649147bb35f3e8f2e3ca4f",
"type": "github"
},
"original": {
"owner": "water-sucks",
"repo": "optnix",
"type": "github"
}
},
"other-transcode": {
"inputs": {
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
]
@ -901,11 +1008,34 @@
"nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"optnix": "optnix",
"other-transcode": "other-transcode",
"river-shifttags": "river-shifttags",
"stylix": "stylix"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"optnix",
"nix-options-doc",
"nixpkgs"
]
},
"locked": {
"lastModified": 1740796337,
"narHash": "sha256-FuoXrXZPoJEZQ3PF7t85tEpfBVID9JQIOnVKMNfTAb0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "bbac9527bc6b28b6330b13043d0e76eac11720dc",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -919,7 +1049,7 @@
"nixpkgs"
],
"nur": "nur",
"systems": "systems_4",
"systems": "systems_5",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@ -1001,6 +1131,21 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {

View file

@ -49,6 +49,8 @@
mms.url = "github:mkaito/nixos-modded-minecraft-servers";
copyparty.url = "github:9001/copyparty";
optnix.url = "github:water-sucks/optnix";
};
outputs = {
nixpkgs,
@ -64,6 +66,7 @@
cassowary,
mms,
copyparty,
optnix,
...
}: let
system = "x86_64-linux";
@ -105,7 +108,7 @@
specialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
breezex-cursor = breezex-cursor.packages.${system}.default;
inherit mms;
inherit optnix home-manager;
};
};
nixosConfigurations.t470 = nixpkgs.lib.nixosSystem {
@ -131,6 +134,7 @@
specialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
breezex-cursor = breezex-cursor.packages.${system}.default;
inherit optnix home-manager;
};
};
};

View file

@ -157,9 +157,9 @@ in {
enable = true;
ediff = true;
settings = {
core = {
# monitor filesystem for changes for faster snapshots in large repos
fsmonitor = "watchman";
# monitor filesystem for changes for faster snapshots in large repos
fsmonitor = {
backend = "watchman";
# automatically snapshot on file changes
watchman.register-snapshot-trigger = true;
};
@ -481,6 +481,9 @@ in {
programs.bat = {
enable = true;
config = {
style = ["header-filename" "grid" "rule"];
};
};
programs.eza = {