Compare commits

...

2 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
ce140cf4f2 merge + fix nixpkgs versions 2025-05-27 07:55:00 +00:00
Lennart J. Kurzweg (Nx2)
a60e90ab8f New Flake Style + WSL + NixOnDroid 2025-05-27 07:15:44 +00:00
31 changed files with 728 additions and 384 deletions

262
flake.lock generated
View File

@@ -114,6 +114,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@@ -360,6 +376,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709445365,
"narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4de84265d7ec7634a69ba75028696d74de9a44a7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@@ -434,11 +471,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1748191712, "lastModified": 1748295224,
"narHash": "sha256-mcTcxv85ljvg49blvLM/xmRtyyLyorpZZJ2ZAZYrYzg=", "narHash": "sha256-yR8zw5bSEHd28fGfGM64nW8y72NOfxFvvrXcR2p4WUE=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "2347050285920925db8bc844e3232bc932eef21e", "rev": "be6ee6e55f08387a9e2fbf712c061fb238a70319",
"revCount": 6137, "revCount": 6141,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -466,11 +503,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748206008, "lastModified": 1748271549,
"narHash": "sha256-fSQLQXzvw6SLYZ6IUjiZhmTm5oSM/A3llOGo8dudWfE=", "narHash": "sha256-MiVqB5DoHqxNSaQVbYmkaIDz02AJ4XS3oXHI1x2lEX0=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-plugins", "repo": "hyprland-plugins",
"rev": "a2157f8da740aa7d2909f7e9414f46097d4cd66d", "rev": "d81d96e9d68c182a202e0bbf14384d60929b4454",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -697,6 +734,75 @@
"type": "github" "type": "github"
} }
}, },
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": "nmd",
"nmt": "nmt"
},
"locked": {
"lastModified": 1705252799,
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": "home-manager_2",
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-docs": "nixpkgs-docs",
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd_2"
},
"locked": {
"lastModified": 1720396533,
"narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_4",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1746453552,
"narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "be618645aa0adf461f778500172b6896d5ab2d01",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1748026106, "lastModified": 1748026106,
@@ -713,13 +819,45 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-docs": {
"locked": {
"lastModified": 1705957679,
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
}
},
"nixpkgs-latest": { "nixpkgs-latest": {
"locked": { "locked": {
"lastModified": 1748252565, "lastModified": 1748330006,
"narHash": "sha256-fM7t3DtPmu2Gl+gBsTUmaM/TB304HYBmqqRxTunKZq0=", "narHash": "sha256-g6dhnA/An7un00tBZ8MeC7V0lU9lLySP9+brMXrm3TU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "03033743f9afc2593dd354c68d7295f946cda6db", "rev": "68a7635955e17148449379318fefcb60b894e775",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -791,11 +929,11 @@
}, },
"nixpkgs-unstable_2": { "nixpkgs-unstable_2": {
"locked": { "locked": {
"lastModified": 1748026106, "lastModified": 1748190013,
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "rev": "62b852f6c6742134ade1abdd2a21685fd617a291",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -836,6 +974,22 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1742937945,
"narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1748162331, "lastModified": 1748162331,
"narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=",
@@ -850,7 +1004,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1747312588, "lastModified": 1747312588,
"narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=", "narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=",
@@ -866,7 +1020,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1727348695, "lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
@@ -882,6 +1036,60 @@
"type": "github" "type": "github"
} }
}, },
"nmd": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs-docs"
],
"scss-reset": "scss-reset"
},
"locked": {
"lastModified": 1705050560,
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=",
"owner": "~rycee",
"repo": "nmd",
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3",
"type": "sourcehut"
},
"original": {
"owner": "~rycee",
"repo": "nmd",
"type": "sourcehut"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@@ -944,7 +1152,9 @@
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"hyprswitch": "hyprswitch", "hyprswitch": "hyprswitch",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_4", "nix-on-droid": "nix-on-droid",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_5",
"nixpkgs-latest": "nixpkgs-latest", "nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable_2", "nixpkgs-unstable": "nixpkgs-unstable_2",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
@@ -1020,6 +1230,22 @@
"type": "github" "type": "github"
} }
}, },
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1159,7 +1385,7 @@
"yazi": { "yazi": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_6",
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_3"
}, },
"locked": { "locked": {
@@ -1202,7 +1428,7 @@
}, },
"zen-browser": { "zen-browser": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1727721329, "lastModified": 1727721329,

View File

@@ -5,68 +5,111 @@
nixpkgs = { url = "nixpkgs/nixos-25.05"; }; nixpkgs = { url = "nixpkgs/nixos-25.05"; };
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; };
nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; };
nix-on-droid = { url = "github:nix-community/nix-on-droid/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
# Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; };
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; }; hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
yazi.url = "github:sxyazi/yazi"; yazi = { url = "github:sxyazi/yazi"; };
yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; }; yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; };
zen-browser.url = "github:MarceColl/zen-browser-flake"; zen-browser = { url = "github:MarceColl/zen-browser-flake"; };
ghostty.url = "github:ghostty-org/ghostty"; ghostty = { url = "github:ghostty-org/ghostty"; };
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let outputs = { self, ... }@inputs: with inputs; let
system = "x86_64-linux"; system = "x86_64-linux";
# config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
config = {};
hyper-base = rec {
inherit system;
user = "nx2"; user = "nx2";
domain = "nx2.site"; domain = "nx2.site";
home = "/home/${user}"; # no tailing slash!
};
config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; pkgs = import nixpkgs { inherit system config; } // {
unstable = import nixpkgs-unstable { inherit system config; };
pkgs = import nixpkgs { inherit system config; }; latest = import nixpkgs-latest { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; }; version = "25.05";
pkgs-latest = import nixpkgs-latest { inherit system config; }; };
nvidia-set = import ./flake-modules/nvidia.nix; nvidia-set = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix; secrets = import ./git-crypt/secrets.nix;
rice = import ./flake-modules/rice.nix pkgs; rice = import ./flake-modules/rice.nix pkgs;
in { in {
nixosConfigurations = let nixosConfigurations = let
make-nixos-system = host: nixpkgs.lib.nixosSystem { make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ ./configuration.nix ]; modules = [ ./configuration.nix ];
specialArgs = let specialArgs = let
nvidia = nvidia-set // { nvidia = nvidia-set // nvidia-settings;
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; hyper = hyper-base // { inherit host; };
prime = if (host == "NxXPS") then true else false; in { inherit pkgs inputs hyper rice secrets nvidia; };
}; };
in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; }; make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./nixos-wsl.nix ];
specialArgs = let
hyper = hyper-base // { inherit host; };
in { inherit pkgs inputs hyper rice; };
};
make-nixondroid-system = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./nix-on-droid.nix ];
specialArgs = let
pkgs.version = "24.05";
hyper = hyper-base // {
inherit host;
system = "aarch64-linux";
home = assert 1 == 2; "";
};
in { inherit pkgs inputs hyper rice; };
}; };
in { in {
NxXPS = make-nixos-system "NxXPS"; NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };
NxNORTH = make-nixos-system "NxNORTH"; NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; };
NxACE = make-nixos-system "NxACE"; NxACE = make-nixos-system "NxACE" { enable = false; };
NxWSL = make-nixos-wsl-system "NxWSL";
NxS23U = make-nixondroid-system "NxS23U";
}; };
homeConfigurations = let homeConfigurations = let
make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration { make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ ./home.nix ]; modules = [ ./home.nix ];
extraSpecialArgs = let extraSpecialArgs = let
nvidia = nvidia-set // { hyper = hyper-base // { inherit host; };
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; nvidia = nvidia-set // nvidia-settings;
prime = if (host == "NxXPS") then true else false; in { inherit pkgs inputs hyper rice secrets nvidia; };
}; };
in { inherit inputs system user host domain pkgs-unstable pkgs-latest rice secrets nvidia; }; make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./shell-only.nix ];
extraSpecialArgs = let
hyper = hyper-base // { inherit host; };
in { inherit pkgs inputs hyper rice secrets; };
}; };
in { in {
"${user}@NxXPS" = make-home-configuration "NxXPS" user; "${hyper-base.user}@NxXPS" = make-home-configuration "NxXPS" hyper-base.user { enable = true; prime = true; };
"${user}@NxNORTH" = make-home-configuration "NxNORTH" user; "${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; };
"${user}@NxACE" = make-home-configuration "NxACE" user; "${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; };
"${hyper-base.user}@NxS23U" = make-shell-configuration "NxS23U" hyper-base.user;
"${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
}; };
}; };
} }

View File

@@ -1,33 +1,8 @@
{ config, pkgs, lib, host, secrets, ... }: { pkgs, hyper ... }:
lib.mkIf (host != "NxACE") lib.mkIf (hyper.host != "NxACE")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
bitwarden bitwarden
bitwarden-cli bitwarden-cli
]; ];
# home.file.".config/Bitwarden CLI/data.json".text = ''
# {
# "stateVersion": 9,
# "global": {
# "theme": "system",
# "window": {},
# "environmentUrls": {
# "base": "https://pw.nx2.site",
# "api": null,
# "identity": null,
# "webVault": null,
# "icons": null,
# "notifications": null,
# "events": null,
# "keyConnector": null
# },
# "region": "Self-hosted",
# "installedVersion": "2023.12.0"
# }
# }
# '';
# home.sessionVariables.BW_SESSION = secrets.bitwarden.env.bw-session;
} }

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, user, secrets, domain, ... }: let { pkgs, hyper, secrets, ... }: let
calendars = [ calendars = with hyper; [
{ {
name = "Preservation"; name = "Preservation";
primary = true; primary = true;
@@ -82,10 +82,10 @@ in {
inherit primary; inherit primary;
remote = { remote = {
inherit url name; inherit url name;
userName = user; # my globally set username userName = hyper.user; # my globally set username
}; };
}; };
in lib.attrsets.mergeAttrsList ( in pkgs.lib.attrsets.mergeAttrsList (
map (calendar: { map (calendar: {
"${calendar.name}" = transform_caledar_set ( default_set // calendar ); "${calendar.name}" = transform_caledar_set ( default_set // calendar );
}) calendars }) calendars
@@ -93,7 +93,7 @@ in {
programs.thunderbird.settings = let programs.thunderbird.settings = let
to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name; to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name;
in (lib.attrsets.mergeAttrsList ( in (pkgs.lib.attrsets.mergeAttrsList (
map (calendar: with ( default_set // calendar ); { map (calendar: with ( default_set // calendar ); {
"calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true; "calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true;
"calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary; "calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary;
@@ -106,7 +106,7 @@ in {
"calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only; "calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only;
}) calendars }) calendars
) // { ) // {
"calendar.list.sortOrder" = lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars; "calendar.list.sortOrder" = pkgs.lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars;
"calendar.week.start" = 1; "calendar.week.start" = 1;
}); });
} }

View File

@@ -1,4 +1,4 @@
{ lib, user, ... }: { ... }:
{ {
programs = { programs = {
direnv = { direnv = {

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }: { pkgs, hyper, ... }:
lib.mkIf (host != "NxACE") pkgs.lib.mkIf (hyper.host != "NxACE")
{ {
home = { home = {
packages = with pkgs; [ packages = with pkgs; [

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, user, rice, secrets, ... }: { pkgs, hyper, rice, secrets, ... }:
lib.mkIf (host != "NxACE") pkgs.lib.mkIf (hyper.host != "NxACE")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
thunderbird thunderbird
@@ -13,7 +13,7 @@ lib.mkIf (host != "NxACE")
in { in {
enable = true; enable = true;
profiles = { profiles = {
"${user}" = { "${hyepr.user}" = {
isDefault = true; isDefault = true;
settings = with rice.color; { settings = with rice.color; {
"calendar.alarms.showmissed" = false; "calendar.alarms.showmissed" = false;

View File

@@ -1,9 +1,12 @@
# { pkgs-unstable, secrets, user, system, inputs, ...}: { pkgs, hyper, ... }:
{ rice, user, ... }:
# browser.tabs.allow_transparent_browser # browser.tabs.allow_transparent_browser
# https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/ # https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/
{ {
home.file = with rice.color; let home = {
packages = with pkgs; [
firefox
];
file = with rice.color; let
blur = builtins.toString 20; blur = builtins.toString 20;
in { in {
".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ ''
@@ -255,4 +258,5 @@
} }
''; '';
}; };
};
} }

View File

@@ -1,9 +1,9 @@
{ pkgs-unstable, pkgs, lib, host, ... }: { pkgs, hyper, ... }:
# lib.mkIf (host == "NxNORTH" || host == "NxACE") # lib.mkIf (host == "NxNORTH" || host == "NxACE")
lib.mkIf (host == "NxNORTH") pkgs.lib.mkIf (host == "NxNORTH")
{ {
home = { home = {
packages = (with pkgs-unstable; [ packages = (with pkgs.unstable; [
protonup protonup
mangohud mangohud

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }: { pkgs, hyper, ... }:
lib.mkIf (host == "NxXPS") pkgs.lib.mkIf (hyper.host == "NxXPS")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
libinput-gestures libinput-gestures

View File

@@ -1,4 +1,4 @@
{ config, rice, inputs, system, ... }: { config, rice, hyper, inputs, ... }:
{ {
home = { home = {
packages = [ inputs.ghostty.packages.${system}.default ]; packages = [ inputs.ghostty.packages.${system}.default ];

View File

@@ -1,12 +1,11 @@
{ pkgs, pkgs-unstable, ... }: { pkgs, ... }:
{ {
# there also is a system module # there also is a system module
home.packages = (with pkgs; [ home.packages = with pkgs; [
gnupg gnupg
gpg-tui gpg-tui
]) ++ ( with pkgs-unstable; [
pinentry-all pinentry-all
]); ];
# services.pcscd.enable = true; # services.pcscd.enable = true;
services.gpg-agent = let services.gpg-agent = let

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, lib, rice, ... }: { pkgs, hyper, rice, ... }:
{ {
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
@@ -18,10 +18,8 @@
vale-ls # style-checker lsp (needs vale) vale-ls # style-checker lsp (needs vale)
ltex-ls # Ltex (language tool) ltex-ls # Ltex (language tool)
vscode-langservers-extracted vscode-langservers-extracted
] ++ (with pkgs-unstable; [
bash-language-server bash-language-server
helix ];
]);
sessionVariables = { sessionVariables = {
EDITOR = "hx"; EDITOR = "hx";
VISUAL = "hx"; VISUAL = "hx";
@@ -30,7 +28,7 @@
programs.helix = { programs.helix = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
package = pkgs-unstable.helix; package = pkgs.unstable.helix;
settings = { settings = {
# theme = "base16_terminal"; # theme = "base16_terminal";
theme = "base16"; theme = "base16";
@@ -274,7 +272,7 @@
command = "nixd"; command = "nixd";
}; };
"style-check" = { "style-check" = {
command = lib.getExe pkgs.vale-ls; command = pkgs.lib.getExe pkgs.vale-ls;
}; };
"language-tool" = { "language-tool" = {
command = "${pkgs.ltex-ls}/bin/ltex-ls"; command = "${pkgs.ltex-ls}/bin/ltex-ls";
@@ -290,7 +288,7 @@
]; ];
}; };
"llm" = { "llm" = {
command = lib.getExe pkgs.helix-gpt; command = pkgs.lib.getExe pkgs.helix-gpt;
args = [ args = [
"--handler" "--handler"
"ollama" "ollama"

View File

@@ -1,5 +1,5 @@
{ config, pkgs, lib, host, ... }: { pkgs, hyper, ... }:
lib.mkIf (host != "NxACE") pkgs.lib.mkIf (hyper.host != "NxACE")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
texlab # LSP texlab # LSP

View File

@@ -1,13 +1,13 @@
{ config, pkgs-unstable, ... }: { pkgs, hyper, ... }:
{ {
home = { home = {
packages = with pkgs-unstable; [ packages = with pkgs; [
nh nh
nix-output-monitor nix-output-monitor
nvd nvd
]; ];
sessionVariables = { sessionVariables = {
NH_FLAKE = "${config.home.homeDirectory}/nix-dots"; NH_FLAKE = "${hyper.home}/nix-dots";
}; };
}; };
} }

View File

@@ -0,0 +1,37 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
bat
browsh
cmake
dig
du-dust
exiftool
eza
ffmpeg
figlet
fzf
glib
glow
gnumake
imagemagick
jq
lolcat
lynx
mediainfo
mpv
neofetch
pdfgrep
pipes
pv
reflex
ripgrep
screen
speedtest-go
sssnake
systemctl-tui
tldr
w3m
yt-dlp
];
}

View File

@@ -1,10 +1,9 @@
{ pkgs, pkgs-unstable, lib, host, ... }: { pkgs, hyper, ... }:
lib.mkIf (host != "NxACE") pkgs.lib.mkIf (hyper.host != "NxACE")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
erlang erlang
rebar3 rebar3
] ++ (with pkgs-unstable; [
gleam gleam
]); ];
} }

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, host, ... }: { pkgs, ... }:
lib.mkIf (host != "NxACE")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
nodejs nodejs

View File

@@ -1,4 +1,4 @@
{ user, inputs, ... }: { hyper, inputs, ... }:
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
@@ -6,7 +6,7 @@
sops = { sops = {
# age.keyFile = "/home/${user}/.config/sops/age/keys.txt"; # age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
gnupg.home = "/home/${user}/.gnupg"; gnupg.home = "${hyper.home}/.gnupg";
defaultSopsFile = ../sops-secrets.yaml; defaultSopsFile = ../sops-secrets.yaml;
# %r is $XDG_RUNTIME_DIR # %r is $XDG_RUNTIME_DIR

View File

@@ -1,10 +1,10 @@
{ pkgs, domain, ... }: { pkgs, hyper, ... }:
{ {
home = { home = {
packages = with pkgs; [ sshfs ]; packages = with pkgs; [ sshfs ];
file.".ssh/config".text = '' file.".ssh/config".text = ''
HOST nxace HOST nxace
HostName ssh.${domain} HostName ssh.${hyper.domain}
User nx2 User nx2
Port 50022 Port 50022
@@ -19,7 +19,7 @@
Port 22 Port 22
HOST nxgit HOST nxgit
HostName ssh.${domain} HostName ssh.${hyper.domain}
User git User git
Port 50022 Port 50022
''; '';

View File

@@ -1,12 +1,13 @@
{ lib, rice, ... }: { pkgs, rice, ... }:
{ {
programs.starship = { programs.starship = {
enable = true; enable = true;
package = pkgs.starship;
# enableBashIntegration = true; # enableBashIntegration = true;
enableFishIntegration = true; enableFishIntegration = true;
settings = with rice.color; { settings = with rice.color; {
add_newline = false; add_newline = false;
format = lib.strings.concatMapStrings (x: "$" + x) [ format = pkgs.lib.strings.concatMapStrings (x: "$" + x) [
"jobs" "jobs"
"battery" "battery"
"username" "username"

View File

@@ -1,18 +1,16 @@
{ pkgs, system, rice, inputs, ... }: { pkgs, hyper, rice, inputs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
# yazi
# dragon
unar unar
]; ];
programs.yazi = { programs.yazi = {
enable = true; enable = true;
# package = pkgs.yazi; # package = pkgs.yazi;
package = inputs.yazi.packages.${system}.default; package = inputs.yazi.packages.${hyper.system}.default;
enableFishIntegration = true; enableFishIntegration = true;
shellWrapperName = "ya"; shellWrapperName = "ya";
plugins = with inputs.yazi-plugins.packages.${system}; { plugins = with inputs.yazi-plugins.packages.${hyper.system}; {
inherit inherit
# chmod # chmod
starship; starship;

View File

@@ -67,7 +67,7 @@
] else []); ] else []);
home.username = user; home.username = user;
home.homeDirectory = "/home/${user}"; home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05"; home.stateVersion = pkgs.version;
home.packages = with pkgs; [ home.packages = with pkgs; [
bat bat
brightnessctl brightnessctl
@@ -110,6 +110,8 @@
swww swww
systemctl-tui systemctl-tui
tldr tldr
unstable.firefox
unstable.spotify
w3m w3m
wev wev
wl-clipboard wl-clipboard
@@ -120,9 +122,6 @@
inputs.zen-browser.packages."${system}".default inputs.zen-browser.packages."${system}".default
] ++ (with pkgs-unstable; [
firefox
spotify
]) ++ (if host != "NxACE" then (with pkgs; [ ]) ++ (if host != "NxACE" then (with pkgs; [
signal-desktop signal-desktop
obsidian obsidian
@@ -134,17 +133,15 @@
xdg = { xdg = {
enable = true; enable = true;
configHome = /home/${user}/.config; configHome = "${hyper.home}.config";
cacheHome = /home/${user}/.cache; cacheHome = "${hyper.home}.cache";
dataHome = /home/${user}/.local/share; dataHome = "${hyper.home}.local/share";
stateHome = /home/${user}/.local/state; stateHome = "${hyper.home}.local/state";
mimeApps = { mimeApps = {
enable = true; enable = true;
defaultApplications = defaultApplications = let
let
browser = "firefox.desktop"; browser = "firefox.desktop";
in in {
{
"default-web-browser" = [ browser ]; "default-web-browser" = [ browser ];
"text/html" = [ browser ]; "text/html" = [ browser ];
"text/htm" = [ browser ]; "text/htm" = [ browser ];

22
nixos-wsl.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs, hyper, inputs, ... }:
{
imports = [
inputs.nixos-wsl.nixosModules.default
./system-modules/users.nix
./system-modules/gc.nix
./system-modules/docker.nix
./system-modules/gpg.nix
./system-modules/networking.nix
./system-modules/nixd.nix
# ./system-modules/sops.nix
# ./system-modules/sshd.nix
# ./system-modules/syncthing.nix
];
system.stateVersion = pkgs.version;
# system.stateVersion = "24.11";
wsl = {
defaultUser = hyper.user;
enable = true;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

44
shell-only.nix Normal file
View File

@@ -0,0 +1,44 @@
{ pkgs, hyper, ... }:
{
imports = [
./home-modules/bash.nix
./home-modules/color-pallete.nix
./home-modules/direnv.nix
./home-modules/fish.nix
./home-modules/git.nix
./home-modules/gpg.nix
./home-modules/helix.nix
./home-modules/latex.nix
./home-modules/nh.nix
./home-modules/nixd.nix
./home-modules/nxgs.nix
./home-modules/pandoc.nix
./home-modules/programming/c.nix
./home-modules/programming/gleam.nix
./home-modules/programming/go.nix
./home-modules/programming/java.nix
./home-modules/programming/js.nix
./home-modules/programming/python.nix
# ./home-modules/sops.nix
./home-modules/ssh.nix
./home-modules/starship.nix
./home-modules/vale.nix
./home-modules/yazi.nix
./home-modules/zoxide.nix
./home-modules/pkgs-list/shell.nix
];
home.username = hyper.user;
# home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here
home.homeDirectory = "/home/${hyper.user}";
home.stateVersion = pkgs.version;
xdg = {
enable = true;
configHome = "${hyper.home}/.config";
cacheHome = "${hyper.home}/.cache";
dataHome = "${hyper.home}/.local/share";
stateHome = "${hyper.home}/.local/state";
};
programs.home-manager.enable = true;
}

View File

@@ -1,4 +1,4 @@
{ pkgs, host, lib, ... }: { pkgs, hyper, lib, ... }:
lib.mkIf (host != "NxACE") lib.mkIf (host != "NxACE")
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@@ -1,4 +1,4 @@
{ config, pkgs, user, ... }: { pkgs, hyper, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -12,7 +12,7 @@
# vpnKitMaxPortIdleTime = 0; # vpnKitMaxPortIdleTime = 0;
# }; # };
}; };
users.users."${user}".extraGroups = [ "docker" ]; users.users."${hyper.user}".extraGroups = [ "docker" ];
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443 443

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, secrets, ... }: { pkgs, hyper, secrets, ... }:
{ {
# sops.secrets = { # sops.secrets = {
# "wireless-networking.env" = {}; # "wireless-networking.env" = {};
@@ -9,7 +9,7 @@
"1.1.1.1" "1.1.1.1"
"8.8.8.8" "8.8.8.8"
]; ];
hostName = host; hostName = hyper.host;
networkmanager = { networkmanager = {
enable = true; enable = true;
}; };
@@ -21,14 +21,4 @@
8080 8080
]; ];
}; };
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";
};
sops.secrets = {
"eduroam/tuda_nmconnection" = {
mode = "0600";
owner = "root";
path = "/etc/NetworkManager/system-connections/eduroam.nmconnection";
};
};
} }

View File

@@ -1,13 +1,13 @@
{ host, secrets, ... }: { hyper, secrets, ... }:
{ {
environment.etc."ssh/ssh_host_ed25519_key.pub".text = if (host == "NxNORTH") then environment.etc."ssh/ssh_host_ed25519_key.pub".text = if (hyper.host == "NxNORTH") then
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1r5gUQPPS/dGB0SsvWtP6WdNWoxMwhhHRrqlO19cJt root@NxNORTH" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1r5gUQPPS/dGB0SsvWtP6WdNWoxMwhhHRrqlO19cJt root@NxNORTH"
else if ( host == "NxXPS" ) then else if ( hyper.host == "NxXPS" ) then
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf+08+t8a0lY2+nR1mhIU3vuksStiJOlojJjzCwFk7r root@NxXPS" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf+08+t8a0lY2+nR1mhIU3vuksStiJOlojJjzCwFk7r root@NxXPS"
else else
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBFfZpWVPlujsz3FklSVAM+tuYn4pzDSijhp5CeYNOZk root@NxACE"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBFfZpWVPlujsz3FklSVAM+tuYn4pzDSijhp5CeYNOZk root@NxACE";
sops.secrets."ssh/${host}-ssh_host_ed25519_key" = { sops.secrets."ssh/${hyper.host}-ssh_host_ed25519_key" = {
mode = "0600"; mode = "0600";
path = "/etc/ssh/ssh_host_ed25519_key.shadow"; path = "/etc/ssh/ssh_host_ed25519_key.shadow";
}; };

13
system-modules/tuda.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";
};
sops.secrets = {
"eduroam/tuda_nmconnection" = {
mode = "0600";
owner = "root";
path = "/etc/NetworkManager/system-connections/eduroam.nmconnection";
};
};
}

View File

@@ -1,9 +1,8 @@
{ pkgs, user, ... }: { pkgs, hyper, ... }:
{ {
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users.users."${user}" = { users.users."${hyper.user}" = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
# TODO: actually put the groups into the relevant files # TODO: actually put the groups into the relevant files