diff --git a/flake.lock b/flake.lock index 62797f7..97e5949 100644 --- a/flake.lock +++ b/flake.lock @@ -135,6 +135,22 @@ "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": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -381,6 +397,27 @@ "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": { "inputs": { "hyprlang": [ @@ -718,6 +755,75 @@ "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": { "locked": { "lastModified": 1742669843, @@ -734,6 +840,38 @@ "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": { "locked": { "lastModified": 1743346368, @@ -857,6 +995,22 @@ } }, "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": { "lastModified": 1743231893, "narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=", @@ -871,7 +1025,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1737003892, "narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=", @@ -887,7 +1041,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1727348695, "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", @@ -903,6 +1057,60 @@ "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": { "inputs": { "flake-compat": "flake-compat_2", @@ -966,7 +1174,9 @@ "hyprland-plugins": "hyprland-plugins", "hyprswitch": "hyprswitch", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_4", + "nix-on-droid": "nix-on-droid", + "nixos-wsl": "nixos-wsl", + "nixpkgs": "nixpkgs_5", "nixpkgs-latest": "nixpkgs-latest", "nixpkgs-unstable": "nixpkgs-unstable_2", "sops-nix": "sops-nix", @@ -1042,6 +1252,22 @@ "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": { "inputs": { "nixpkgs": [ @@ -1196,7 +1422,7 @@ "yazi": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_3" }, "locked": { @@ -1239,7 +1465,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1727721329, diff --git a/flake.nix b/flake.nix index 5a73b4e..db82a6e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,72 +1,116 @@ -{ +rec { description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; inputs = { - nixpkgs = { url = "nixpkgs/nixos-24.11"; }; - nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; - nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; - home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; - sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; - hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; - 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"; }; + nixpkgs = { url = "nixpkgs/nixos-24.11"; }; + nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; + nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; - yazi.url = "github:sxyazi/yazi"; - yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; }; - zen-browser.url = "github:MarceColl/zen-browser-flake"; - ghostty.url = "github:ghostty-org/ghostty"; + home-manager = { url = "github:nix-community/home-manager/release-24.11"; 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"; }; + lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; }; + + hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; + 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"; }; + + yazi = { url = "github:sxyazi/yazi"; }; + yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; }; + zen-browser = { url = "github:MarceColl/zen-browser-flake"; }; + ghostty = { url = "github:ghostty-org/ghostty"; }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let - system = "x86_64-linux"; - user = "nx2"; - domain = "nx2.site"; + outputs = { self, ... }@inputs: with inputs; let - config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; + 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"; + domain = "nx2.site"; + home = "/home/${user}"; # no tailing slash! + }; - pkgs = import nixpkgs { inherit system config; }; - pkgs-unstable = import nixpkgs-unstable { inherit system config; }; - pkgs-latest = import nixpkgs-latest { inherit system config; }; + pkgs = import nixpkgs { inherit system config; } // { + unstable = import nixpkgs-unstable { inherit system config; }; + latest = import nixpkgs-latest { inherit system config; }; + version = "24.11"; + }; nvidia-set = import ./flake-modules/nvidia.nix; secrets = import ./git-crypt/secrets.nix; rice = import ./flake-modules/rice.nix pkgs; + in { nixosConfigurations = let - make-nixos-system = host: nixpkgs.lib.nixosSystem { + make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem { inherit system; modules = [ ./configuration.nix ]; specialArgs = let - nvidia = nvidia-set // { - enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; - prime = if (host == "NxXPS") then true else false; - }; - in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; }; + nvidia = nvidia-set // nvidia-settings; + hyper = hyper-base // { inherit host; }; + in { inherit pkgs inputs hyper rice secrets 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 + hyper = hyper-base // { + inherit host; + system = "aarch64-linux"; + home = assert 1 == 2; ""; + }; + in { inherit pkgs inputs hyper rice; }; }; in { - NxXPS = make-nixos-system "NxXPS"; - NxNORTH = make-nixos-system "NxNORTH"; - NxACE = make-nixos-system "NxACE"; + NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; }; + NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; }; + NxACE = make-nixos-system "NxACE" { enable = false; }; + + NxWSL = make-nixos-wsl-system "NxWSL"; + + NxS23U = make-nixondroid-system "NxS23U"; }; homeConfigurations = let - make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration { + make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./home.nix ]; extraSpecialArgs = let - nvidia = nvidia-set // { - enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; - prime = if (host == "NxXPS") then true else false; - }; - in { inherit inputs system user host domain pkgs-unstable pkgs-latest rice secrets nvidia; }; + hyper = hyper-base // { inherit host; }; + nvidia = nvidia-set // nvidia-settings; + in { inherit pkgs inputs hyper 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 { - "${user}@NxXPS" = make-home-configuration "NxXPS" user; - "${user}@NxNORTH" = make-home-configuration "NxNORTH" user; - "${user}@NxACE" = make-home-configuration "NxACE" user; + "${hyper-base.user}@NxXPS" = make-home-configuration "NxXPS" hyper-base.user { enable = true; prime = true; }; + "${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; }; + "${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; }; }; } diff --git a/home-modules/bitwarden.nix b/home-modules/bitwarden.nix index b5414d8..5834d90 100644 --- a/home-modules/bitwarden.nix +++ b/home-modules/bitwarden.nix @@ -1,33 +1,8 @@ -{ config, pkgs, lib, host, secrets, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper ... }: +lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ bitwarden 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; - } diff --git a/home-modules/calendar.nix b/home-modules/calendar.nix index d185cf2..6a43682 100644 --- a/home-modules/calendar.nix +++ b/home-modules/calendar.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, user, secrets, domain, ... }: let - calendars = [ +{ pkgs, hyper, secrets, ... }: let + calendars = with hyper; [ { name = "Preservation"; primary = true; @@ -82,10 +82,10 @@ in { inherit primary; remote = { 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: { "${calendar.name}" = transform_caledar_set ( default_set // calendar ); }) calendars @@ -93,7 +93,7 @@ in { programs.thunderbird.settings = let to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name; - in (lib.attrsets.mergeAttrsList ( + in (pkgs.lib.attrsets.mergeAttrsList ( map (calendar: with ( default_set // calendar ); { "calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true; "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; }) 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; }); } diff --git a/home-modules/direnv.nix b/home-modules/direnv.nix index 3cd677c..7f2470b 100644 --- a/home-modules/direnv.nix +++ b/home-modules/direnv.nix @@ -1,4 +1,4 @@ -{ lib, user, ... }: +{ ... }: { programs = { direnv = { diff --git a/home-modules/discord.nix b/home-modules/discord.nix index 6134473..d3810f9 100644 --- a/home-modules/discord.nix +++ b/home-modules/discord.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home = { packages = with pkgs; [ diff --git a/home-modules/email.nix b/home-modules/email.nix index 374837d..417e51b 100644 --- a/home-modules/email.nix +++ b/home-modules/email.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, user, rice, secrets, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, rice, secrets, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ thunderbird @@ -13,7 +13,7 @@ lib.mkIf (host != "NxACE") in { enable = true; profiles = { - "${user}" = { + "${hyepr.user}" = { isDefault = true; settings = with rice.color; { "calendar.alarms.showmissed" = false; diff --git a/home-modules/firefox.nix b/home-modules/firefox.nix index 7524dd9..313231a 100644 --- a/home-modules/firefox.nix +++ b/home-modules/firefox.nix @@ -1,258 +1,262 @@ -# { pkgs-unstable, secrets, user, system, inputs, ...}: -{ rice, user, ... }: +{ pkgs, hyper, ... }: # browser.tabs.allow_transparent_browser # https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/ { - home.file = with rice.color; let - blur = builtins.toString 20; - in { - ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' - :root{ - /* Popup panels */ - --arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --arrowpanel-border-color : ${border} !important; - --arrowpanel-color : ${secondary.base} !important; - --arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; - --arrowpanel-dimmed-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.6) !important; - --arrowpanel-dimmed-even-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.8) !important; + home = { + packages = with pkgs; [ + firefox + ]; + file = with rice.color; let + blur = builtins.toString 20; + in { + ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' + :root{ + /* Popup panels */ + --arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --arrowpanel-border-color : ${border} !important; + --arrowpanel-color : ${secondary.base} !important; + --arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; + --arrowpanel-dimmed-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.6) !important; + --arrowpanel-dimmed-even-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.8) !important; - /* Autocomplete */ - --autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --autocomplete-popup-color : ${foreground} !important; - --autocomplete-popup-highlight-background: ${accent.base} !important; - --autocomplete-popup-highlight-color : ${foreground} !important; + /* Autocomplete */ + --autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --autocomplete-popup-color : ${foreground} !important; + --autocomplete-popup-highlight-background: ${accent.base} !important; + --autocomplete-popup-highlight-color : ${foreground} !important; - /* Toolbar background */ - --toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; - --toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --toolbar-non-lwt-bgimage : none !important; - --toolbar-color : ${foreground} !important; + /* Toolbar background */ + --toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important; + --toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --toolbar-non-lwt-bgimage : none !important; + --toolbar-color : ${foreground} !important; - /* Tabs */ - --tab-selected-bgcolor : ${accent.base} !important; - --tabs-border-color : ${border} !important; - --tab-line-color : ${accent.base} !important; - --tab-loader-size : 16px !important; + /* Tabs */ + --tab-selected-bgcolor : ${accent.base} !important; + --tabs-border-color : ${border} !important; + --tab-line-color : ${accent.base} !important; + --tab-loader-size : 16px !important; - /* Sidebar */ - --lwt-sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --lwt-sidebar-text-color : ${foreground} !important; - --sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --sidebar-text-color : ${foreground} !important; - --sidebar-border-color : ${border} !important; + /* Sidebar */ + --lwt-sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --lwt-sidebar-text-color : ${foreground} !important; + --sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --sidebar-text-color : ${foreground} !important; + --sidebar-border-color : ${border} !important; - /* URL bar */ - --urlbar-popup-url-color : ${foreground} !important; - --urlbar-popup-action-color : ${secondary.base} !important; - --toolbar-field-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --toolbar-field-focus-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - --toolbar-field-color : ${accent.base} !important; - --toolbar-field-focus-color : ${foreground} !important; - --toolbar-field-focus-border-color : ${accent.base} !important; + /* URL bar */ + --urlbar-popup-url-color : ${foreground} !important; + --urlbar-popup-action-color : ${secondary.base} !important; + --toolbar-field-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --toolbar-field-focus-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + --toolbar-field-color : ${accent.base} !important; + --toolbar-field-focus-color : ${foreground} !important; + --toolbar-field-focus-border-color : ${accent.base} !important; - /* Buttons */ - --toolbarbutton-icon-fill : ${foreground} !important; - --toolbarbutton-hover-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.2) !important; - --toolbarbutton-active-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.4) !important; + /* Buttons */ + --toolbarbutton-icon-fill : ${foreground} !important; + --toolbarbutton-hover-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.2) !important; + --toolbarbutton-active-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.4) !important; - /* Notification and panel */ - --panel-disabled-color : rgba(${rice.lib.hex-to-rgb-comma-string foreground},0.3) !important; - --panel-separator-color : ${border} !important; + /* Notification and panel */ + --panel-disabled-color : rgba(${rice.lib.hex-to-rgb-comma-string foreground},0.3) !important; + --panel-separator-color : ${border} !important; - /* New tab page */ - --newtab-background-color : ${background} !important; - --newtab-background-color-secondary : ${background} !important; - --newtab-text-primary-color : ${foreground} !important; - --newtab-text-secondary-color : ${secondary.base} !important; - --newtab-search-icon-color : ${accent.base} !important; + /* New tab page */ + --newtab-background-color : ${background} !important; + --newtab-background-color-secondary : ${background} !important; + --newtab-text-primary-color : ${foreground} !important; + --newtab-text-secondary-color : ${secondary.base} !important; + --newtab-search-icon-color : ${accent.base} !important; - --tabpanel-background-color : transparent !important; - background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; - } - .tabbrowser-tab[selected="true"] { - color: ${background} !important; - } + --tabpanel-background-color : transparent !important; + background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; + } + .tabbrowser-tab[selected="true"] { + color: ${background} !important; + } - #appcontent { - background: transparent !important; - } - #navigator-toolbox { - --tabs-border-color: transparent !important; - } - #toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box { - background-color: transparent !important; - -moz-appearance: none !important; - background-image: none !important; - } - - window, #nav-bar{ - background-color: transparent !important; - -moz-appearance: none !important; - background-image: none !important; - } - ''; - - ".mozilla/firefox/${user}/chrome/userContent.css".text = /* css */ '' - /* Removes the white loading page */ - /* url(about:newtab), url(about:home) */ - @-moz-document url(about:blank) { - html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { - background: ${background} !important; - } - } - - /* Sets up minimal incognito scrollbar */ - @-moz-document url(about:privatebrowsing) { - :root{ - scrollbar-width: thin !important; - scrollbar-color: rgb(161, 161, 161) transparent !important; - } - } - - /* new-tab */ - @-moz-document url-prefix(about:home), url-prefix(about:newtab) { - :root{ - --newtab-background-color-secondary: ${background} !important; - } - body, html { + #appcontent { background: transparent !important; + } + #navigator-toolbox { + --tabs-border-color: transparent !important; + } + #toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box { + background-color: transparent !important; + -moz-appearance: none !important; + background-image: none !important; } - .tile, .search-handoff-button { - border: ${builtins.toString rice.border-width}px solid ${border} !important; - } - } - @-moz-document domain(reddit.com) { - header { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; - backdrop-filter: blur(${blur}px); - } - body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{ + window, #nav-bar{ background-color: transparent !important; - } - } + -moz-appearance: none !important; + background-image: none !important; + } + ''; - @-moz-document domain(reddit.com) { - header { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; - } - body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{ - background-color: transparent !important; + ".mozilla/firefox/${user}/chrome/userContent.css".text = /* css */ '' + /* Removes the white loading page */ + /* url(about:newtab), url(about:home) */ + @-moz-document url(about:blank) { + html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { + background: ${background} !important; + } } - } - @-moz-document domain(google.com) { - .sfbg { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; - backdrop-filter: blur(${blur}px); + /* Sets up minimal incognito scrollbar */ + @-moz-document url(about:privatebrowsing) { + :root{ + scrollbar-width: thin !important; + scrollbar-color: rgb(161, 161, 161) transparent !important; + } } - body, html, div#search > * { - background-color: transparent !important; - border: ${builtins.toString rice.border-width} solid ${border}; + + /* new-tab */ + @-moz-document url-prefix(about:home), url-prefix(about:newtab) { + :root{ + --newtab-background-color-secondary: ${background} !important; + } + body, html { + background: transparent !important; + } + .tile, .search-handoff-button { + border: ${builtins.toString rice.border-width}px solid ${border} !important; + } } - .g, .appbar { - background-color: transparent !important; - border: ${builtins.toString rice.border-width} solid ${border}; + + @-moz-document domain(reddit.com) { + header { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(${blur}px); + } + body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{ + background-color: transparent !important; + } } - div#rso { - * { + + @-moz-document domain(reddit.com) { + header { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + } + body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{ + background-color: transparent !important; + } + } + + @-moz-document domain(google.com) { + .sfbg { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important; + backdrop-filter: blur(${blur}px); + } + body, html, div#search > * { background-color: transparent !important; border: ${builtins.toString rice.border-width} solid ${border}; } - } - div#cnt > div { + .g, .appbar { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + div#rso { + * { + background-color: transparent !important; + border: ${builtins.toString rice.border-width} solid ${border}; + } + } + div#cnt > div { + } } - } - @media (prefers-color-scheme: dark) { - :root .theme-system { - --color-bg: transtparent !important; - --color-text: ${rice.color.foreground} + @media (prefers-color-scheme: dark) { + :root .theme-system { + --color-bg: transtparent !important; + --color-text: ${rice.color.foreground} + } } - } - @-moz-document domain(developer.mozilla.org) { - html, body { - background-color: transparent !important; + @-moz-document domain(developer.mozilla.org) { + html, body { + background-color: transparent !important; + } + .top-navigation, .article-actions-container { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px); + border-radius: ${builtins.toString rice.rounding}px; + } } - .top-navigation, .article-actions-container { - background-color: rgba(0,0,0,1) !important; - backdrop-filter: blur(100px); - border-radius: ${builtins.toString rice.rounding}px; - } - } - @-moz-document domain(github.com) { - body, html, header, #repository-container-header, .bgColor-muted, section { - background-color: transparent !important; + @-moz-document domain(github.com) { + body, html, header, #repository-container-header, .bgColor-muted, section { + background-color: transparent !important; + } } - } - @-moz-document domain(mynixos.com) { - body, html { - background-color: transparent !important; + @-moz-document domain(mynixos.com) { + body, html { + background-color: transparent !important; + } + header, footer { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px); + border-radius: ${builtins.toString rice.rounding}px; + } } - header, footer { - background-color: rgba(0,0,0,1) !important; - backdrop-filter: blur(100px); - border-radius: ${builtins.toString rice.rounding}px; - } - } - @-moz-document domain(moodle.informatik.tu-darmstadt.de) { - body, html , .main-inner, .main-inner * { - background-color: transparent !important; + @-moz-document domain(moodle.informatik.tu-darmstadt.de) { + body, html , .main-inner, .main-inner * { + background-color: transparent !important; + } + .bg-primary { + background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important! + } } - .bg-primary { - background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important! - } - } - @-moz-document url-prefix("https://nx2.site/") { - html { - background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; - background-repeat: repeat !important; - background-size: 2vmin 2vmin !important; + @-moz-document url-prefix("https://nx2.site/") { + html { + background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; + background-repeat: repeat !important; + background-size: 2vmin 2vmin !important; + } } - } - @-moz-document url-prefix("pw.nx2.site") { - html { - background: black; + @-moz-document url-prefix("pw.nx2.site") { + html { + background: black; + } } - } - @-moz-document url-prefix("pw.nx2.site") { - html { - background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; - background-repeat: repeat !important; - background-size: 2vmin 2vmin !important; - } - body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body { - background-color: transparent !important; - } - .modal-open, .modal-header, form.modal-content, .modal-footer { - background-color: rgba(0,0,0,0.8) !important; - backdrop-filter: blur(5px); - } - .cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content { - background-color: rgba(0,0,0,0.8) !important; - border-radius: 10px !important; - border: ${toString rice.border-width}px solid ${border} !important; - } - } + @-moz-document url-prefix("pw.nx2.site") { + html { + background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important; + background-repeat: repeat !important; + background-size: 2vmin 2vmin !important; + } + body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body { + background-color: transparent !important; + } + .modal-open, .modal-header, form.modal-content, .modal-footer { + background-color: rgba(0,0,0,0.8) !important; + backdrop-filter: blur(5px); + } + .cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content { + background-color: rgba(0,0,0,0.8) !important; + border-radius: 10px !important; + border: ${toString rice.border-width}px solid ${border} !important; + } + } - @-moz-document domain(chatgpt.com) { - body, html , .bg-token-sidebar-surface-primary { - background-color: transparent !important; + @-moz-document domain(chatgpt.com) { + body, html , .bg-token-sidebar-surface-primary { + background-color: transparent !important; + } + .bg-token-main-surface-primary { + background-color: rgba(0,0,0,1) !important; + backdrop-filter: blur(100px) !important; + border-radius: ${builtins.toString rice.rounding}px !important; + } } - .bg-token-main-surface-primary { - background-color: rgba(0,0,0,1) !important; - backdrop-filter: blur(100px) !important; - border-radius: ${builtins.toString rice.rounding}px !important; - } - } - ''; + ''; + }; }; } diff --git a/home-modules/games.nix b/home-modules/games.nix index 17a14cb..6cdb11a 100644 --- a/home-modules/games.nix +++ b/home-modules/games.nix @@ -1,9 +1,9 @@ -{ pkgs-unstable, pkgs, lib, host, ... }: +{ pkgs, hyper, ... }: # lib.mkIf (host == "NxNORTH" || host == "NxACE") -lib.mkIf (host == "NxNORTH") +pkgs.lib.mkIf (host == "NxNORTH") { home = { - packages = (with pkgs-unstable; [ + packages = (with pkgs.unstable; [ protonup mangohud diff --git a/home-modules/gestures.nix b/home-modules/gestures.nix index 5dea219..c025d97 100644 --- a/home-modules/gestures.nix +++ b/home-modules/gestures.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host == "NxXPS") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host == "NxXPS") { home.packages = with pkgs; [ libinput-gestures diff --git a/home-modules/ghostty.nix b/home-modules/ghostty.nix index 5dffc84..c23b406 100644 --- a/home-modules/ghostty.nix +++ b/home-modules/ghostty.nix @@ -1,4 +1,4 @@ -{ config, rice, inputs, system, ... }: +{ config, rice, hyper, inputs, ... }: { home = { packages = [ inputs.ghostty.packages.${system}.default ]; diff --git a/home-modules/gpg.nix b/home-modules/gpg.nix index 234c761..7a9878f 100644 --- a/home-modules/gpg.nix +++ b/home-modules/gpg.nix @@ -1,12 +1,11 @@ -{ pkgs, pkgs-unstable, ... }: +{ pkgs, ... }: { # there also is a system module - home.packages = (with pkgs; [ + home.packages = with pkgs; [ gnupg gpg-tui - ]) ++ ( with pkgs-unstable; [ pinentry-all - ]); + ]; # services.pcscd.enable = true; services.gpg-agent = let diff --git a/home-modules/helix.nix b/home-modules/helix.nix index 24add18..162a9b9 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-unstable, lib, rice, ... }: +{ pkgs, hyper, rice, ... }: { home = { packages = with pkgs; [ @@ -18,10 +18,8 @@ vale-ls # style-checker lsp (needs vale) ltex-ls # Ltex (language tool) vscode-langservers-extracted - ] ++ (with pkgs-unstable; [ bash-language-server - helix - ]); + ]; sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; @@ -30,7 +28,7 @@ programs.helix = { enable = true; defaultEditor = true; - package = pkgs-unstable.helix; + package = pkgs.unstable.helix; settings = { # theme = "base16_terminal"; theme = "base16"; @@ -274,7 +272,7 @@ command = "nixd"; }; "style-check" = { - command = lib.getExe pkgs.vale-ls; + command = pkgs.lib.getExe pkgs.vale-ls; }; "language-tool" = { command = "${pkgs.ltex-ls}/bin/ltex-ls"; @@ -290,7 +288,7 @@ ]; }; "llm" = { - command = lib.getExe pkgs.helix-gpt; + command = pkgs.lib.getExe pkgs.helix-gpt; args = [ "--handler" "ollama" diff --git a/home-modules/latex.nix b/home-modules/latex.nix index 3c43050..a40c574 100644 --- a/home-modules/latex.nix +++ b/home-modules/latex.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ texlab # LSP diff --git a/home-modules/nh.nix b/home-modules/nh.nix index b03c1b5..00db414 100644 --- a/home-modules/nh.nix +++ b/home-modules/nh.nix @@ -1,13 +1,13 @@ -{ config, pkgs-unstable, ... }: +{ pkgs, hyper, ... }: { home = { - packages = with pkgs-unstable; [ + packages = with pkgs; [ nh nix-output-monitor nvd ]; sessionVariables = { - FLAKE = "${config.home.homeDirectory}/nix-dots"; + FLAKE = "${hyper.home}/nix-dots"; }; }; } diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix new file mode 100644 index 0000000..bdd67fa --- /dev/null +++ b/home-modules/pkgs-list/shell.nix @@ -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 + ]; +} diff --git a/home-modules/programming/gleam.nix b/home-modules/programming/gleam.nix index c4dd691..f4a826c 100644 --- a/home-modules/programming/gleam.nix +++ b/home-modules/programming/gleam.nix @@ -1,10 +1,9 @@ -{ pkgs, pkgs-unstable, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, hyper, ... }: +pkgs.lib.mkIf (hyper.host != "NxACE") { home.packages = with pkgs; [ erlang rebar3 - ] ++ (with pkgs-unstable; [ gleam - ]); + ]; } diff --git a/home-modules/programming/js.nix b/home-modules/programming/js.nix index e2decfd..8360c5d 100644 --- a/home-modules/programming/js.nix +++ b/home-modules/programming/js.nix @@ -1,5 +1,4 @@ -{ pkgs, lib, host, ... }: -lib.mkIf (host != "NxACE") +{ pkgs, ... }: { home.packages = with pkgs; [ nodejs diff --git a/home-modules/sops.nix b/home-modules/sops.nix index 23468d8..8973679 100644 --- a/home-modules/sops.nix +++ b/home-modules/sops.nix @@ -1,4 +1,4 @@ -{ user, inputs, ... }: +{ hyper, inputs, ... }: { imports = [ inputs.sops-nix.homeManagerModules.sops @@ -6,7 +6,7 @@ sops = { # age.keyFile = "/home/${user}/.config/sops/age/keys.txt"; - gnupg.home = "/home/${user}/.gnupg"; + gnupg.home = "${hyper.home}/.gnupg"; defaultSopsFile = ../sops-secrets.yaml; # %r is $XDG_RUNTIME_DIR diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index 5811c21..37d0c5e 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -1,10 +1,10 @@ -{ pkgs, domain, ... }: +{ pkgs, hyper, ... }: { home = { packages = with pkgs; [ sshfs ]; file.".ssh/config".text = '' HOST nxace - HostName ssh.${domain} + HostName ssh.${hyper.domain} User nx2 Port 50022 @@ -19,7 +19,7 @@ Port 22 HOST nxgit - HostName ssh.${domain} + HostName ssh.${hyper.domain} User git Port 50022 ''; diff --git a/home-modules/starship.nix b/home-modules/starship.nix index d48815a..46c23b5 100644 --- a/home-modules/starship.nix +++ b/home-modules/starship.nix @@ -1,12 +1,13 @@ -{ lib, rice, ... }: +{ pkgs, rice, ... }: { programs.starship = { enable = true; + package = pkgs.starship; # enableBashIntegration = true; enableFishIntegration = true; settings = with rice.color; { add_newline = false; - format = lib.strings.concatMapStrings (x: "$" + x) [ + format = pkgs.lib.strings.concatMapStrings (x: "$" + x) [ "jobs" "battery" "username" @@ -154,5 +155,5 @@ vlang.format = "[\\[$symbol($version)\\]](fg:${foreground})"; zig.format = "[\\[$symbol($version)\\]](fg:${foreground})"; }; - }; + }; } diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index b60aa46..f389913 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -1,18 +1,16 @@ -{ pkgs, system, rice, inputs, ... }: +{ pkgs, hyper, rice, inputs, ... }: { home.packages = with pkgs; [ - # yazi - # dragon unar - ]; + ]; programs.yazi = { enable = true; # package = pkgs.yazi; - package = inputs.yazi.packages.${system}.default; + package = inputs.yazi.packages.${hyper.system}.default; enableFishIntegration = true; shellWrapperName = "ya"; - plugins = with inputs.yazi-plugins.packages.${system}; { + plugins = with inputs.yazi-plugins.packages.${hyper.system}; { inherit # chmod starship; diff --git a/home.nix b/home.nix index b77d179..e3dc5af 100644 --- a/home.nix +++ b/home.nix @@ -67,7 +67,7 @@ ] else []); home.username = user; home.homeDirectory = "/home/${user}"; - home.stateVersion = "24.05"; + home.stateVersion = pkgs.version; home.packages = with pkgs; [ bat brightnessctl @@ -110,6 +110,8 @@ swww systemctl-tui tldr + unstable.firefox + unstable.spotify w3m wev wl-clipboard @@ -120,9 +122,6 @@ inputs.zen-browser.packages."${system}".default - ] ++ (with pkgs-unstable; [ - firefox - spotify ]) ++ (if host != "NxACE" then (with pkgs; [ signal-desktop obsidian @@ -134,17 +133,15 @@ xdg = { enable = true; - configHome = /home/${user}/.config; - cacheHome = /home/${user}/.cache; - dataHome = /home/${user}/.local/share; - stateHome = /home/${user}/.local/state; + configHome = "${hyper.home}.config"; + cacheHome = "${hyper.home}.cache"; + dataHome = "${hyper.home}.local/share"; + stateHome = "${hyper.home}.local/state"; mimeApps = { enable = true; - defaultApplications = - let + defaultApplications = let browser = "firefox.desktop"; - in - { + in { "default-web-browser" = [ browser ]; "text/html" = [ browser ]; "text/htm" = [ browser ]; diff --git a/nixos-wsl.nix b/nixos-wsl.nix new file mode 100644 index 0000000..c4f003d --- /dev/null +++ b/nixos-wsl.nix @@ -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" ]; +} diff --git a/shell-only.nix b/shell-only.nix new file mode 100644 index 0000000..1a14784 --- /dev/null +++ b/shell-only.nix @@ -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; +} + diff --git a/system-modules/adb.nix b/system-modules/adb.nix index 5378460..eeb06e1 100644 --- a/system-modules/adb.nix +++ b/system-modules/adb.nix @@ -1,4 +1,4 @@ -{ pkgs, host, lib, ... }: +{ pkgs, hyper, lib, ... }: lib.mkIf (host != "NxACE") { environment.systemPackages = with pkgs; [ diff --git a/system-modules/docker.nix b/system-modules/docker.nix index 26b310e..7d9d8f7 100644 --- a/system-modules/docker.nix +++ b/system-modules/docker.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, ... }: +{ pkgs, hyper, ... }: { environment.systemPackages = with pkgs; [ @@ -12,7 +12,7 @@ # vpnKitMaxPortIdleTime = 0; # }; }; - users.users."${user}".extraGroups = [ "docker" ]; + users.users."${hyper.user}".extraGroups = [ "docker" ]; networking.firewall.allowedTCPPorts = [ 80 443 diff --git a/system-modules/networking.nix b/system-modules/networking.nix index d922517..9224f26 100644 --- a/system-modules/networking.nix +++ b/system-modules/networking.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, host, secrets, ... }: +{ pkgs, hyper, secrets, ... }: { # sops.secrets = { # "wireless-networking.env" = {}; @@ -9,7 +9,7 @@ "1.1.1.1" "8.8.8.8" ]; - hostName = host; + hostName = hyper.host; networkmanager = { enable = true; }; @@ -21,14 +21,4 @@ 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"; - }; - }; } diff --git a/system-modules/sshd.nix b/system-modules/sshd.nix index 7bdd4b3..5566b3d 100644 --- a/system-modules/sshd.nix +++ b/system-modules/sshd.nix @@ -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" - else if ( host == "NxXPS" ) then + else if ( hyper.host == "NxXPS" ) then "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf+08+t8a0lY2+nR1mhIU3vuksStiJOlojJjzCwFk7r root@NxXPS" else "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"; path = "/etc/ssh/ssh_host_ed25519_key.shadow"; }; diff --git a/system-modules/tuda.nix b/system-modules/tuda.nix new file mode 100644 index 0000000..e4f3674 --- /dev/null +++ b/system-modules/tuda.nix @@ -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"; + }; + }; +} diff --git a/system-modules/users.nix b/system-modules/users.nix index aa67651..361d09b 100644 --- a/system-modules/users.nix +++ b/system-modules/users.nix @@ -1,9 +1,8 @@ -{ pkgs, user, ... }: - +{ pkgs, hyper, ... }: { users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish - users.users."${user}" = { + users.users."${hyper.user}" = { isNormalUser = true; extraGroups = [ # TODO: actually put the groups into the relevant files