diff --git a/configuration.nix b/configuration.nix index 2e8762e..0bcd6f0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -32,7 +32,6 @@ ./system-modules/sops.nix ./system-modules/sound.nix ./system-modules/sshd.nix - ./system-modules/base-packages.nix ./system-modules/input.nix ./system-modules/syncthing.nix ./system-modules/tuda.nix @@ -61,6 +60,8 @@ ./system-modules/calendar/dicos.nix ] else [ ]); + environment.systemPackages = import ./system-modules/base-packages.nix pkgs; + systemd.extraConfig = "DefaultLimitNOFILE=2048"; system.stateVersion = hyper.pkgs-version; nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/flake-modules/rice.nix b/flake-modules/rice.nix index 717aa19..e204622 100644 --- a/flake-modules/rice.nix +++ b/flake-modules/rice.nix @@ -55,9 +55,10 @@ pkgs: rec { }; in ccolor // fcolor // xcolor; font = { - code = { + code = rec { name = "JetBrainsMono Nerd Font"; package = pkgs.nerd-fonts.jetbrains-mono; + regular-path = "${package}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFont-Regular.ttf"; }; base = { # name = "NewComputerModern08"; diff --git a/flake.lock b/flake.lock index 3d0d886..9270878 100644 --- a/flake.lock +++ b/flake.lock @@ -153,7 +153,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, @@ -234,6 +234,27 @@ "type": "github" } }, + "home-manager24": { + "inputs": { + "nixpkgs": [ + "nixpkgs24" + ] + }, + "locked": { + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.05", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -475,27 +496,6 @@ "type": "github" } }, - "hyprspace": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "systems": "systems_2" - }, - "locked": { - "lastModified": 1759033501, - "narHash": "sha256-QhcOFLJYC9CiSVPkci62ghMEAJChzl+L98To1pKvnRQ=", - "owner": "KZDKM", - "repo": "Hyprspace", - "rev": "e54884da1d6a1af76af9d053887bf3750dd554fd", - "type": "github" - }, - "original": { - "owner": "KZDKM", - "repo": "Hyprspace", - "type": "github" - } - }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -570,6 +570,57 @@ "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-manager24" + ], + "nix-formatter-pack": "nix-formatter-pack", + "nixpkgs": [ + "nixpkgs24" + ], + "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_3", @@ -605,6 +656,38 @@ "type": "indirect" } }, + "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": 1761810199, @@ -652,6 +735,22 @@ "type": "indirect" } }, + "nixpkgs24": { + "locked": { + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1761114652, @@ -731,6 +830,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", @@ -785,14 +938,16 @@ "inputs": { "copyparty": "copyparty", "home-manager": "home-manager", + "home-manager24": "home-manager24", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", - "hyprspace": "hyprspace", "lanzaboote": "lanzaboote", + "nix-on-droid": "nix-on-droid", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_5", "nixpkgs-latest": "nixpkgs-latest", "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs24": "nixpkgs24", "sops-nix": "sops-nix", "yazi": "yazi" } @@ -839,6 +994,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": [ @@ -875,21 +1046,6 @@ } }, "systems_2": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index e04e435..19231b5 100644 --- a/flake.nix +++ b/flake.nix @@ -2,23 +2,44 @@ description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; inputs = { - nixpkgs = { url = "nixpkgs/nixos-25.05"; }; - nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; }; - nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; }; + nixpkgs.url = "nixpkgs/nixos-25.05"; + nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; + nixpkgs-latest.url = "github:nixos/nixpkgs?ref=master"; + nixpkgs24.url = "github:NixOS/nixpkgs/nixos-24.05"; - 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"; + }; + home-manager24 ={ + url = "github:nix-community/home-manager/release-24.05"; + inputs.nixpkgs.follows = "nixpkgs24"; + }; - 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 = "nixpkgs24"; + inputs.home-manager.follows = "home-manager24"; + }; - sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; }; + nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; - 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"; }; + sops-nix ={ + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - yazi = { url = "github:sxyazi/yazi"; }; - copyparty = { url = "github:9001/copyparty"; }; + lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2"; + + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins"; + inputs.hyprland.follows = "hyprland"; + }; + + yazi.url = "github:sxyazi/yazi"; + + copyparty.url = "github:9001/copyparty"; }; outputs = { ... }@inputs: with inputs; let @@ -28,20 +49,19 @@ config = { allowUnfreePredicate = pkg: builtins.elem (simple-pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; hyper-base = rec { - inherit system; + system = "x86_64-linux"; user = "nx2"; domain = "nx2.site"; home = "/home/${user}"; webroot = "/var/lib/hugo/nx2site/public"; - pkgs-version = "25.05"; }; - my-pkgs = host: import nixpkgs { + get-pkgs = { host, system?system, nixpkgs?inputs.nixpkgs, version?"25.05" }: import nixpkgs { inherit system config; overlays = [(final: prev: { unstable = import nixpkgs-unstable { inherit system config; }; latest = import nixpkgs-latest { inherit system config; }; - version = "25.05"; + inherit version; })] ++ (if host == "NxACE" then [ copyparty.overlays.default ] else []); @@ -53,17 +73,18 @@ in { nixosConfigurations = let make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem { - pkgs = my-pkgs host; + pkgs = get-pkgs { inherit host; }; modules = [ ./configuration.nix ]; specialArgs = let hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); }; in { inherit inputs hyper rice secrets; }; }; make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem { - pkgs = my-pkgs host; - modules = [ ./nixos-wsl.nix ]; + pkgs = get-pkgs { inherit host; }; + modules = [ ./wsl.nix ]; specialArgs = let hyper = hyper-base // { inherit host; }; + rice = import ./flake-modules/rice.nix pkgs; in { inherit inputs hyper rice; }; }; in { @@ -73,16 +94,37 @@ NxDCS = make-nixos-wsl-system "NxDCS"; }; + nixOnDroidConfigurations = let + makeNODConfiguration = host: nix-on-droid.lib.nixOnDroidConfiguration rec { + pkgs = let + options = { inherit host; system = "aarch64-linux"; }; + in (get-pkgs options) // + (get-pkgs (options // { version = "24.05"; nixpkgs = nixpkgs24; } ) + ); + modules = [ ./nod.nix ]; + home-manager-path = home-manager24.outPath; + extraSpecialArgs = let + hyper = hyper-base // { + inherit host; + system = "aarch64-linux"; + user = "nix-on-droid"; + home = "/data/data/com.termux.nix/files/home"; + }; + rice = import ./flake-modules/rice.nix pkgs; + in { inherit inputs hyper rice; }; + }; + in { NxS23U = makeNODConfiguration "NxS23U"; }; + homeConfigurations = let make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration { - pkgs = my-pkgs host; + pkgs = get-pkgs { inherit host; }; modules = [ ./home.nix ]; extraSpecialArgs = let hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; }; in { inherit inputs hyper rice secrets; }; }; make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration { - pkgs = my-pkgs host; + pkgs = get-pkgs { inherit host; }; modules = [ ./shell-only.nix ]; extraSpecialArgs = let hyper = hyper-base // { inherit host; }; diff --git a/home-modules/bash.nix b/home-modules/bash.nix index 2b1f025..3b29227 100644 --- a/home-modules/bash.nix +++ b/home-modules/bash.nix @@ -1,6 +1,10 @@ -{ ... }: +{ pkgs, ... }: { - programs.bash = { + programs.bash = let + init = /* bash */ '' + source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh + ''; + in { enable = true; shellAliases = { ll = "ls -l"; @@ -15,5 +19,10 @@ "checkjobs" ]; enableCompletion = false; - }; + + } // pkgs.lib.mkIf (pkgs.version != "24.05") { + shellInit = init; + } // pkgs.lib.mkIf (pkgs.version != "25.05") { + profileExtra = init; + }; } diff --git a/home-modules/fish.nix b/home-modules/fish.nix index e2090a3..d0d419d 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -1,7 +1,6 @@ { pkgs, ... }@all: with all; { home.packages = with pkgs; [ - fish any-nix-shell (writeShellScriptBin "nxfetch" /* bash */ '' @@ -26,11 +25,11 @@ $(echo -e "$logo" | sed -n 4p): ''${XDG_CURRENT_DESKTOP^} $(echo -e "$logo" | sed -n 5p): ''${TERM^} $(echo -e "$logo" | sed -n 6p): $(bash --version | head --lines 1 | cut -f -4 -d' ' | sed -E 's-(.*?), version (.*?)\(.*-\1 \2-g') - $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev | sed 's/./\U&/') + $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev | sed 's/./\&/') $(echo -e "$logo" | sed -n 8p): ''$(uname -r | sed -E 's=(.+-.+-.+-.+)-.+=\1=g') - $(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g' | sed 's/./\U&/') + $(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g' | awk '{print toupper(substr($0,1,1)) substr($0,2)}') $(echo -e "$logo" | sed -n 10p): $(yazi --version | sed -E 's-(.*?) \(.*-\1-g') - $(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1 | sed 's/./\U&/') + $(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1 | awk '{print toupper(substr($0,1,1)) substr($0,2)}') " echo -e "$msg" '') @@ -40,6 +39,7 @@ programs.fish = { enable = true; + package = pkgs.fish; shellAliases = let base-eza = "eza --icons --git --smart-group --group-directories-first"; in { @@ -115,7 +115,7 @@ ''; nx_backup = let destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/"; - in pkgs.lib.mkIf (hyper.host != "NxACE" && hyper.host != "NxDCS") '' + in pkgs.lib.mkIf (hyper.host == "NxXPS" || hyper.host == "NxNORTH") '' set RPATH (curl -s https://${hyper.domain}/latest-backup) rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination} ''; diff --git a/home-modules/gpg.nix b/home-modules/gpg.nix index 11e62c9..4980f1b 100644 --- a/home-modules/gpg.nix +++ b/home-modules/gpg.nix @@ -39,10 +39,6 @@ enableFishIntegration = true; defaultCacheTtlSsh = min2sec 60; defaultCacheTtl = min2sec 30; - pinentry = { - package = pkgs.pinentry; - program = "pinentry"; - }; extraConfig = '' allow-loopback-pinentry ''; diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 664baf7..0dce4a0 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -6,6 +6,7 @@ monitors = { xps = { main = { name = "eDP-1"; resolution = "1920x1200"; position = "1920x1080"; scale = "1.0"; }; + # main = { name = "eDP-1"; resolution = "1920x1080"; position = "1920x1080"; scale = "1.0"; }; second = { name = "desc:Sony SONY TV 0x01010101"; resolution = "1920x1080"; position = "1920x0"; scale = "1.0"; }; third = { name = "DP-6"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; }; }; @@ -41,7 +42,7 @@ in { # inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo # inputs.hyprfocus.packages.${pkgs.system}.hyprfocus # inputs.hycov.packages.${pkgs.system}.hycov - pkgs.hyprlandPlugins.hyprspace + # pkgs.hyprlandPlugins.hyprspace # inputs.hyprspace.packages.${pkgs.system}.Hyprspace ]; @@ -51,6 +52,7 @@ in { "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" "${second.name}, ${second.resolution}, ${second.position}, ${second.scale}" "${third.name}, ${third.resolution}, ${third.position}, ${third.scale}" + " ,preferred, auto, 1, mirror, eDP-1" ]) else (if hyper.host == "NxNORTH" then (with monitors.north; [ "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" "${left.name}, ${left.resolution}, ${left.position}, ${left.scale}" diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix index b97e907..69bd4b4 100644 --- a/home-modules/pkgs-list/shell.nix +++ b/home-modules/pkgs-list/shell.nix @@ -34,6 +34,7 @@ systemctl-tui tldr w3m + which yt-dlp ]; } diff --git a/home-modules/rofi.nix b/home-modules/rofi.nix index 6a1ed01..6a46826 100644 --- a/home-modules/rofi.nix +++ b/home-modules/rofi.nix @@ -1,114 +1,46 @@ -{ pkgs, ... }@all: with all; -{ - home.packages = with pkgs; [ - rofi-wayland - ]; - home.file = let - trdr = "${rice.lib.float-to-drune rice.transparency}"; - in with rice.color; { - ".config/rofi/config.rasi".text = '' - configuration { - show-icons: false; - display-drun: ""; - disable-history: false; - drun-display-format: "{name} [({generic})] [({exec})]"; - } - - * { - font: "${rice.font.code.name} 12"; - foreground: ${foreground}; - background-color: ${background}${trdr}; - padding: 0px; - margin: 0px; - spacing: 0px; - border-width: 0px; - } - - #window { - background-color: ${background}${trdr}; - border: ${builtins.toString rice.border-width}px; - border-radius: ${builtins.toString rice.rounding}; - border-color: ${border}; - } - #mainbox { - border: 0; - padding: 0; - } - #message { - border: 0px; - } - #textbox { - text-color: ${foreground}; - } - #listview { - fixed-height: 0; - border: 0px; - spacing: 0px ; - scrollbar: false; - padding: 0px; - } - - - - #element { - border: 0; - padding: 0px; - border-radius: ${if rice.rounding > 0 then "2" else "0"}px; - } - - #element.normal.normal { background-color: ${background}${trdr}; text-color: ${accent.base}; } - #element.selected.normal { background-color: ${tertiary.base}${trdr}; text-color: ${background}; } - #element.alternate.normal { background-color: ${background}${trdr}; text-color: ${secondary.base}; } - - - #scrollbar { - width: ${builtins.toString rice.border-width}px ; - border: 0; - handle-width: 8px ; - padding: 0; - } - #sidebar { - border: ${builtins.toString rice.border-width}px dash; - } - #button.selected { - text-color: ${foreground}; - } - #inputbar { - spacing: 0; - text-color: ${background}; - background-color: ${accent.base}${trdr}; - padding: 0; - margine-bottom: 2px; - children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; - } - #prompt { - spacing: 0; - background-color: transparent; - text-color: ${foreground}; - } - #textbox-prompt-colon { - expand: false; - str: ">"; - margin: 0px 0.3em 0em 0em ; - text-color: ${background}; - background-color: transparent; - } - #case-indicator { - spacing: 0; - text-color: ${foreground}; - background-color: transparent; - } - #entry { - spacing: 0; - text-color: ${background}; - background-color: transparent; - placeholder: ""; - } - - element-text, element-icon { - background-color: inherit; - text-color: inherit; - } - ''; +{ pkgs, ... }@all: with all; { + home = { + packages = with pkgs; [ rofi-wayland ]; + file = let # the home-manager module sucks + trdr = "${rice.lib.float-to-drune rice.transparency}"; + ts = builtins.toString; + in with rice.color; { + ".config/rofi/config.rasi".text = '' + configuration { + show-icons: false; + display-drun: ""; + disable-history: false; + } + * { + font: "${rice.font.code.name} 12"; + foreground: ${foreground}; + text-color: ${foreground}; + background-color: transparent; + padding: 0px; + margin: 0px; + spacing: 0px; + border-width: 0px; + } + window { + background-color: transparent; + border: ${ts rice.border-width}px; + border-radius: ${ts rice.rounding}px; + border-color: ${ts rice.color.border}; + } + listview { scrollbar: false; } + element { border-radius: ${ts rice.rounding}px; } + element.normal.normal { background-color: ${accent.darker}; text-color: ${accent.base}; } + element.selected.normal { background-color: ${accent.base}; text-color: ${accent.bright}; } + element.alternate.normal { background-color: ${secondary.darker}; text-color: ${secondary.base}; } + inputbar { children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; } + prompt { } + textbox-prompt-colon { + expand: false; + str: ">"; + } + case-indicator { } + entry { placeholder: ""; } + ''; + }; }; } diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index ee9535f..044b7ef 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -8,7 +8,7 @@ nxace = name: { host = name; hostname = "ssh.${hyper.domain}"; - user = hyper.user; + user = "nx2"; port = 50022; identityFile = "${hyper.home}/vault/ssh/nxace-nx2-${hyper.host}"; }; diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index b556c69..2bf9517 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -1,39 +1,17 @@ { pkgs, ... }@all: with all; let + nox-var = (pkgs.version != "24.05"); tfc = pkgs.unstable.xdg-desktop-portal-termfilechooser; in { home.packages = [ pkgs.unar tfc ]; - programs.yazi = { enable = true; # package = pkgs.yazi; package = inputs.yazi.packages.${hyper.system}.default; enableFishIntegration = true; - shellWrapperName = "ya"; - initLua = /* lua */ '' - require("zoxide"):setup { - update_db = true, - } - Status:children_add(function() - local h = cx.active.current.hovered - if not h or ya.target_family() ~= "unix" then - return "" - end - - return ui.Line { - ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"), - ":", - ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"), - " ", - } - end, 500, Status.RIGHT) - ''; - plugins = with pkgs; { - inherit glow git; - }; - # initLua = /* lua */ '' ''; + # initLua = /* lua */ '' ''; # down keymap = { mgr.keymap = [ { on = ""; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; } @@ -403,7 +381,31 @@ in { ]; }; }; - }; + } // (if nox-var then { + shellWrapperName = "ya"; + initLua = /* lua */ '' + require("zoxide"):setup { + update_db = true, + } + Status:children_add(function() + local h = cx.active.current.hovered + if not h or ya.target_family() ~= "unix" then + return "" + end + + return ui.Line { + ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"), + ":", + ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"), + " ", + } + end, 500, Status.RIGHT) + ''; + plugins = with pkgs; { + inherit glow git; + }; + } else {}); + xdg = { configFile."xdg-desktop-portal-termfilechooser/config" = { force = true; diff --git a/nix-on-droid.nix b/nix-on-droid.nix deleted file mode 100644 index fe30dc8..0000000 --- a/nix-on-droid.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ pkgs, ... }@all: with all; -{ - # Simply install just the packages - environment.packages = with pkgs; [ - helix - git - lazygit - yazi - ]; - - # Backup etc files instead of failing to activate generation if a file already exists in /etc - environment.etcBackupExtension = ".bak"; - - # Read the changelog before changing this value - system.stateVersion = pkgs.version; - - # Set up nix for flakes - nix.extraOptions = '' - experimental-features = nix-command flakes - ''; - - # Set your time zone - time.timeZone = "Europe/Berlin"; -} diff --git a/nod.nix b/nod.nix new file mode 100644 index 0000000..3aef4ec --- /dev/null +++ b/nod.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }@all: with all; { + environment = { + packages = import ./system-modules/base-packages.nix pkgs; + etcBackupExtension = ".bak"; + motd = ""; + }; + terminal = { + font = rice.font.code.regular-path; + }; + android-integration = { + termux-setup-storage.enable = true; + }; + system.stateVersion = pkgs.version; + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + user ={ + shell = "${pkgs.fish}/bin/fish"; + # userName = pkgs.lib.mkForce hyper.user; if its read-only, whats the point of this option??? + }; + + + # Set your time zone + time.timeZone = "Europe/Berlin"; + + home-manager = { + config = import ./shell-only.nix; + useGlobalPkgs = true; + backupFileExtension = "backup"; + extraSpecialArgs = { inherit (all) inputs hyper rice; }; + }; +} diff --git a/shell-only.nix b/shell-only.nix index 00299ae..8341478 100644 --- a/shell-only.nix +++ b/shell-only.nix @@ -12,7 +12,7 @@ ./home-modules/nixd.nix ./home-modules/nxgs.nix ./home-modules/pandoc.nix - ./home-modules/programming/c.nix + # ./home-modules/programming/c.nix ./home-modules/programming/gleam.nix ./home-modules/programming/go.nix ./home-modules/programming/java.nix @@ -30,7 +30,7 @@ home = { username = hyper.user; homeDirectory = hyper.home; - stateVersion = hyper.pkgs-version; + stateVersion = pkgs.version; }; xdg = { enable = true; diff --git a/system-modules/base-packages.nix b/system-modules/base-packages.nix index 0ccdd77..6634ce6 100644 --- a/system-modules/base-packages.nix +++ b/system-modules/base-packages.nix @@ -1,19 +1,18 @@ -{ pkgs, ... }: { - environment.systemPackages = with pkgs; ([ - git - git-crypt - lazygit # home-manager module is bugged - wget - curlHTTP3 - zip - unzip - p7zip - unar - vim - htop - openssl - dmidecode - file - ]); +pkgs: with pkgs; [ + busybox + # coreutils-full + gitFull + git-crypt -} + wget + curlHTTP3 + zip + unzip + p7zip + unar + vim + htop + openssl + dmidecode + file +] diff --git a/nixos-wsl.nix b/wsl.nix similarity index 100% rename from nixos-wsl.nix rename to wsl.nix