organizing config and getting rid of withs as much as possible

This commit is contained in:
Christoph Hollizeck 2024-09-06 21:28:59 +02:00
parent 358d57e8eb
commit 3a31a8b5ee
Signed by: Daholli
GPG key ID: 1763BB530F50279E
12 changed files with 142 additions and 57 deletions

View file

@ -8,11 +8,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1724740262,
"narHash": "sha256-cpFasbzOTlwLi4fNas6hDznVUdCJn/lMLxi7MAMG6hg=",
"lastModified": 1725604324,
"narHash": "sha256-+VgeYuaCQn5vmoH1GTYQzvVTtWxirZmdDQJKr8uLgQI=",
"owner": "nix-community",
"repo": "fenix",
"rev": "703efdd9b5c6a7d5824afa348a24fbbf8ff226be",
"rev": "d9afdb4465ba2f20bb73b0ff5d2c2837cafc2e14",
"type": "github"
},
"original": {
@ -287,11 +287,11 @@
]
},
"locked": {
"lastModified": 1724435763,
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
"lastModified": 1725628988,
"narHash": "sha256-Y6TBMTGu4bddUwszGjlcOuN0soVc1Gv43hp+1sT/GNI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
"rev": "127ccc3eb7e36fa75e8c3fbd8a343154f66cc1c6",
"type": "github"
},
"original": {
@ -347,11 +347,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1724575805,
"narHash": "sha256-OB/kEL3GAhUZmUfkbPfsPhKs0pRqJKs0EEBiLfyKZw8=",
"lastModified": 1725477728,
"narHash": "sha256-ahej1VRqKmWbG7gewty+GlrSBEeGY/J2Zy8Nt8+3fdg=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "9fc19be21f0807d6be092d70bf0b1de0c00ac895",
"rev": "880be1ab837e1e9fe0449dae41ac4d034694d4ce",
"type": "github"
},
"original": {
@ -369,11 +369,11 @@
]
},
"locked": {
"lastModified": 1724664098,
"narHash": "sha256-4SgV4jCoN5RffR1Mtn3HI1cjgHmARh+rZrpVlBclj9U=",
"lastModified": 1725358307,
"narHash": "sha256-su/Nzp2X8JlaD9wPYQGXeTilaVa5H06X7A3kqCLJNuo=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "345dfa06658a37873ca18aa205f409e4aaf1caa6",
"rev": "8a89995f745b1a9029d654c391a0f62ca03f7fe7",
"type": "github"
},
"original": {
@ -428,11 +428,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1724479785,
"narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=",
"lastModified": 1725432240,
"narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be",
"rev": "ad416d066ca1222956472ab7d0555a6946746a80",
"type": "github"
},
"original": {
@ -444,11 +444,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1721466660,
"narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100",
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
"type": "github"
},
"original": {
@ -458,6 +458,22 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1724819573,
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"fenix": "fenix",
@ -471,17 +487,18 @@
"snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_2",
"sops-nix": "sops-nix",
"unstable": "unstable"
"unstable": "unstable",
"zen-browser": "zen-browser"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1724666781,
"narHash": "sha256-nOQDgjTDlWe0/+Ptf3o2p6UrznQFHnXBHRV1ZAsSpe8=",
"lastModified": 1725548942,
"narHash": "sha256-ZnF5MaOAeiiKIATYN4rrqNsnhSQOQ+Hvfg0mHLvN04Y=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "095926ea6f008477a15a2ec6b0b8797e2e5be0e5",
"rev": "124c7482167ff6eea4f7663c0be87ea568ccd8c6",
"type": "github"
},
"original": {
@ -565,11 +582,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1723501126,
"narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=",
"lastModified": 1725540166,
"narHash": "sha256-htc9rsTMSAY5ek+DB3tpntdD/es0eam2hJgO92bWSys=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "be0eec2d27563590194a9206f551a6f73d52fa34",
"rev": "d9d781523a1463965cd1e1333a306e70d9feff07",
"type": "github"
},
"original": {
@ -640,11 +657,11 @@
},
"unstable": {
"locked": {
"lastModified": 1724479785,
"narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=",
"lastModified": 1725432240,
"narHash": "sha256-+yj+xgsfZaErbfYM3T+QvEE2hU7UuE+Jf0fJCJ8uPS0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be",
"rev": "ad416d066ca1222956472ab7d0555a6946746a80",
"type": "github"
},
"original": {
@ -653,6 +670,24 @@
"repo": "nixpkgs",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1725529174,
"narHash": "sha256-6hhiPXXZw24jaQJKJgaLIZ9Z8iEs25Sb+xMqEv6t2Go=",
"owner": "MarceColl",
"repo": "zen-browser-flake",
"rev": "5fce6f9bc9b2bda1f0281fcbef3160903ddc5882",
"type": "github"
},
"original": {
"owner": "MarceColl",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

View file

@ -50,6 +50,9 @@
sops-nix.url = "github:Mic92/sops-nix";
## temporary
zen-browser.url = "github:MarceColl/zen-browser-flake";
################
## inputs for dev shells

View file

@ -1,17 +1,16 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
inherit(lib) mkIf;
inherit(lib.wyrdgard) mkBoolOpt;
cfg = config.wyrdgard.apps.cli-apps.nixvim;
in
{
options.wyrdgard.apps.cli-apps.nixvim = with types; {
options.wyrdgard.apps.cli-apps.nixvim = {
enable = mkBoolOpt true "Whether to enable nixvim or not (Default true)";
};

View file

@ -22,6 +22,15 @@ in
qt5.qtwayland
];
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
vivaldi-bin
'';
mode = "0755";
};
};
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}

View file

@ -0,0 +1,34 @@
{
options,
config,
lib,
pkgs,
system,
inputs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps.zen-browser;
in
{
options.wyrdgard.apps.zen-browser = with types; {
enable = mkBoolOpt false "Whether or not to enable zen browser";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
inputs.zen-browser.packages."${system}".default
];
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
.zen-wrapped
'';
mode = "0755";
};
};
};
}

View file

@ -4,14 +4,13 @@
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps.factorio-server;
inherit (config.wyrdgard.user) name;
cfg = config.wyrdgard.services.factorio-server;
inherit (lib) mkIf mkEnableOption;
in
{
options.wyrdgard.apps.factorio-server = with types; {
options.wyrdgard.services.factorio-server = {
enable = mkEnableOption "Enable Factorio Headless Server";
};
@ -55,7 +54,6 @@ in
nonBlockingSaving = true;
autosave-interval = 5;
loadLatestSave = true;
bind = "192.168.178.34";
extraSettingsFile = config.sops.templates."extraSettingsFile.json".path;
};
};

View file

@ -1,11 +1,15 @@
{ lib, config, ... }:
with lib;
with lib.wyrdgard;
{
lib,
config,
...
}:
let
cfg = config.wyrdgard.apps.onedrive;
cfg = config.wyrdgard.services.onedrive;
inherit (lib) mkEnableOption mkIf;
in
{
options.wyrdgard.apps.onedrive = with types; {
options.wyrdgard.services.onedrive = {
enable = mkEnableOption "Enable OneDrive integration";
};

View file

@ -20,7 +20,6 @@ in
wyrdgard.graphical-interface = {
display-manager.sddm = enabled;
desktop-manager = {
hyprland = enabled;
kde = enabled;
};
};

View file

@ -28,7 +28,7 @@ let
pkgs.runCommandNoCC "propagated-icon"
{
passthru = {
inherit (fileName);
inherit (fileName) ;
};
}
''

View file

@ -1,7 +1,7 @@
#ENC[AES256_GCM,data:Y75QxOB7YrOA,iv:mZ2f288IG/pmlQRtCqdcz03dDTYMnnj50Vsk/BwTJ+c=,tag:gPHZgq091G4LYMan9R6z1w==,type:comment]
factorio_username: ENC[AES256_GCM,data:rI7vF0XlaQ==,iv:+d5dD+nawphw+g8zavFXUr87bewTL1d+fuFnYKuYJKc=,tag:B8/6I7zi0b6xo8TFsY35Ug==,type:str]
factorio_token: ENC[AES256_GCM,data:0JOQv4UGiz2j2KPEoNm2IuE3qt8XfKuVEBWJ2+fF,iv:EUc8vhrB5NcgFKO7xTCxG2PzUuFCJFIl1KB90NqCOXw=,tag:rCilwxD8sw+Ql5HzvcUEJQ==,type:str]
factorio_game_password: ENC[AES256_GCM,data:OWETag==,iv:jkru1eLic7rl5RJVOMfF4cyT3FBGYCj3EKkpvMF22dk=,tag:sypcyM8ixpNdG70xiOzVIg==,type:str]
factorio_game_password: ENC[AES256_GCM,data:wwmltZzhYlQ=,iv:2LPugIqfPLJ5PbdrVfI36+76pAVp5Rano4T6968OsKs=,tag:kRpWL4wYnm/X4SHYypzVyA==,type:str]
nixpkgs_review_auth: ENC[AES256_GCM,data:4zd7nThKhMMQxuxVdGZFUyJJ3rDBC29h9ydGmjKBEFy9Lz5X9TCf3w==,iv:u3aasLXSqer50RZDvvwGr0mwEoyywWaMr6q9VhPZieg=,tag:/rfQ4LHfJsvFYH+4hBe4LQ==,type:str]
sops:
kms: []
@ -18,8 +18,8 @@ sops:
TzdjVjVtWmxNNm96WHhXSGM4WjErMkEKoGtyn6M91h+ye8U/ltOuOQ74RUo/2R37
l5vR47FUyzilUliIK2PDUMXM/S3Yk3Zi6g3XL8OPd53X5I1UYUJmRw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-05-22T09:21:53Z"
mac: ENC[AES256_GCM,data:vKJ/Ro7qy6bYr/UqMEpBHA6WPyawuki36kdu1GIpT0SkXT9epvTivi/rNb+BnQp19ahLhIqZ4jS5yzmmEztAHZc9e4QPk6IzFPJeXDt91nLdggwE7s5ZdUT+C+DDO2X0/vw/Pa6VS11NkWZeNAyoT7FdDTFfgCWWv5cGQYFYm8M=,iv:7Hj02cImojjFahxVtRFtdStrjOf/vpgKinKCdetepMg=,tag:n2u2f0P5kU90QJPGUnDzQw==,type:str]
lastmodified: "2024-09-06T19:21:22Z"
mac: ENC[AES256_GCM,data:xgRgCRNtsoa3h7ss9uUyOVmGWoQqZ8+vSk0sNkhOeev1tB9qesTnkqNfRkilRyZPNen5xTV8iupvlB4wLVjODGDLueaimnOjWxrk8urSLPEbCzjLUsWuWiVANIkkyGWn0KH4mxr4pR0lt+Yy2JRKuzKGPYKYHWwnCg1saVCC2VE=,iv:iu86TvF8ur8RALGkJTgam35kJ4QRx6ruMBnj7o99A8k=,tag:AY/hCByZd1SNVIrWZ4qp4A==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1
version: 3.9.0

View file

@ -16,14 +16,16 @@
...
}:
let
fenix = with inputs.fenix.packages.${system}; combine [
latest.toolchain
targets.wasm32-unknown-unknown.latest.rust-std
];
fenix =
with inputs.fenix.packages.${system};
combine [
latest.toolchain
targets.wasm32-unknown-unknown.latest.rust-std
];
in
mkShell {
# Create your shell
nativeBuildInputs = [
nativeBuildInputs = [
fenix
pkgs.llvmPackages.bintools
pkgs.wasm-pack

View file

@ -1,10 +1,8 @@
{
inputs,
pkgs,
lib,
...
}:
with lib;
with lib.wyrdgard;
{
imports = [ ./hardware.nix ];
@ -25,13 +23,17 @@ with lib.wyrdgard;
apps = {
vivaldi = enabled;
zen-browser = enabled;
discord = enabled;
_1password = enabled;
onedrive = enabled;
factorio-server = enabled;
obs-studio = enabled;
};
services = {
factorio-server = enabled;
onedrive = enabled;
};
system = {
autoUpgrade = {
enable = true;