diff --git a/.envrc b/.envrc deleted file mode 100644 index 29e16c1..0000000 --- a/.envrc +++ /dev/null @@ -1,3 +0,0 @@ -watch_file ./flake.lock **/*.nix - -use flake diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ba199db..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.direnv -result -result-* diff --git a/README.md b/README.md index 6e58059..cf7a4ea 100644 --- a/README.md +++ b/README.md @@ -14,16 +14,17 @@ Hey, you. This is my nixos configurations. - david@Tytonidae -| Specialisation | DE / WM | Shell | Editor | Terminal | Launcher | Browser | DM | -| -------------- | ------- | ----------- | ----------- | -------- | -------- | ------- | ---------------- | -| default | niri | fish + bash | helix + zed | ghostty | fuzzel | firefox | greetd + regreet | -| kde | kde | fish + bash | helix + zed | ghostty | kde run | firefox | sddm | +| Specialisation | DE / WM | Shell | Editor | Terminal | Launcher | Browser | DM | +| -------------- | --------- | ----------- | ----------- | -------- | --------------- | ------- | ---------------- | +| default | niri | fish + bash | helix + zed | ghostty | fuzzel | firefox | greetd + regreet | +| cosmic | cosmic de | fish + bash | helix + zed | ghostty | cosmic-launcher | firefox | cosmic-greeter | +| kde | kde | fish + bash | helix + zed | ghostty | - | firefox | sddm | - david@Akun | Specialisation | DE / WM | Shell | Editor | Terminal | Launcher | Browser | DM | | -------------- | ------- | ----------- | ----------- | -------- | -------- | ------- | ---------------- | -| default | niri | fish + bash | helix + zed | ghostty | fuzzel | firefox | greetd + regreet | +| default | niri | fish + bash | helix + zed | ghostty | - | firefox | greetd + regreet | - alice@Cape diff --git a/flake.lock b/flake.lock index f2dbe00..c9a2e91 100644 --- a/flake.lock +++ b/flake.lock @@ -90,11 +90,11 @@ "bt-tracker": { "flake": false, "locked": { - "lastModified": 1746720600, - "narHash": "sha256-HRa7/lX6Cz1+c0Bo0mdTgyTCAKV17I45N7F41IUd0/c=", + "lastModified": 1746144670, + "narHash": "sha256-l1Roga5tbx5775OQDD34lQAntmlU56A3HKqJrK86P2I=", "owner": "XIU2", "repo": "TrackersListCollection", - "rev": "b90418d8ee2ef9a999dd8c412393f95cc711035d", + "rev": "0a9ac8d11e9e67649edf33b378190e17ce1e7e9e", "type": "github" }, "original": { @@ -157,11 +157,11 @@ ] }, "locked": { - "lastModified": 1746695594, - "narHash": "sha256-pAAWYs3S+/tY65vemHZdVSXpeIz4JINEJZoPoBjr8JU=", + "lastModified": 1745812220, + "narHash": "sha256-hotBG0EJ9VmAHJYF0yhWuTVZpENHvwcJ2SxvIPrXm+g=", "owner": "nix-community", "repo": "disko", - "rev": "6bb82b77ce140137177e30df067759931ab60a73", + "rev": "d0c543d740fad42fe2c035b43c9d41127e073c78", "type": "github" }, "original": { @@ -221,11 +221,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1746162366, - "narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=", + "lastModified": 1717312683, + "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", "owner": "nix-community", "repo": "flake-compat", - "rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b", + "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", "type": "github" }, "original": { @@ -352,11 +352,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1746649518, - "narHash": "sha256-ogOT0WwOy8rY5vhJ5JfVOa3qc6sbDxRAMQAQIjCz1gk=", + "lastModified": 1746118269, + "narHash": "sha256-nWCxF4Fl53yaJzxlHVDkDZNrWGsrYk9f5ondtMa+S04=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "bcff488095cab023f26bb7bbfaf674cb0086ef87", + "rev": "e79bf71f2322fa5d54af07f2985f8460290f2085", "type": "github" }, "original": { @@ -441,11 +441,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1746710534, - "narHash": "sha256-OkPewzZXoV3CI7nHln2/Y5hPKVe0NuwNzFQnOveOsv4=", + "lastModified": 1746132885, + "narHash": "sha256-naxkk3EcVXP8gPeG/mQq2i37ITvAZs1AKw7K7u5DXuE=", "owner": "helix-editor", "repo": "helix", - "rev": "e4ef096945638850ad1b383c49cd197e1458c614", + "rev": "aa3fad84ef136b482eb5f84abbf109f25af9700a", "type": "github" }, "original": { @@ -462,11 +462,11 @@ ] }, "locked": { - "lastModified": 1746719124, - "narHash": "sha256-KOL73WIjO00ds1oIe+5HAcGcpd/TfE6dymmmYbiSlYM=", + "lastModified": 1746134275, + "narHash": "sha256-sxfY7TIP59o2hcueanoRAtg833PiNroZkQDwlKJxGvs=", "owner": "nix-community", "repo": "home-manager", - "rev": "3c59c5132b64e885faca381e713b579dcbddba75", + "rev": "015f1913109d44c36e683b55f0e47e283b383caa", "type": "github" }, "original": { @@ -486,11 +486,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1746717416, - "narHash": "sha256-MDL5/PMRdWnKt6QtkVrEejdyMKUShoxRLTqtrbpRWys=", + "lastModified": 1746133891, + "narHash": "sha256-ZZVz8ZPa+T9/pKt3khNKZ79dya5qWX1nMhJ1D46vpE8=", "owner": "jj-vcs", "repo": "jj", - "rev": "da6d564e266a663bbce52c2a1f13a76b6a6ce967", + "rev": "0eceed9832d53b8e870123c88d1c1f0514fb061b", "type": "github" }, "original": { @@ -604,11 +604,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1746702551, - "narHash": "sha256-ygR8f63Z+3mkqak1XBWjPYqB0KMVCLVE9UZaoOavrFc=", + "lastModified": 1746109800, + "narHash": "sha256-sjDpqdvbQaiA6OAsgLE4niz6hmmCpoUH0cl5zyfu6FI=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "bfb8be07381e9b847c9f38cd63a809023f6da086", + "rev": "9fe1aa7b6a1043003b38f36626dd29b52247d720", "type": "github" }, "original": { @@ -619,11 +619,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1746621361, - "narHash": "sha256-T9vOxEqI1j1RYugV0b9dgy0AreiZ9yBDKZJYyclF0og=", + "lastModified": 1745955289, + "narHash": "sha256-mmV2oPhQN+YF2wmnJzXX8tqgYmUYXUj3uUUBSTmYN5o=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "2ea3ad8a1f26a76f8a8e23fc4f7757c46ef30ee5", + "rev": "72081c9fbbef63765ae82bff9727ea79cc86bd5b", "type": "github" }, "original": { @@ -635,11 +635,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1745930157, + "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", "type": "github" }, "original": { @@ -698,11 +698,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1746557022, - "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=", + "lastModified": 1746055187, + "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860", + "rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", "type": "github" }, "original": { @@ -714,11 +714,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1746064326, + "narHash": "sha256-r7IZkN9NhK/IO9/J6D9ih2P1OXb67nr5HaQ1YAte18w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "91bf6dffa21c7709607c9fdbf9a6acb44e7a0a5d", "type": "github" }, "original": { @@ -754,11 +754,11 @@ "nur-rycee": { "flake": false, "locked": { - "lastModified": 1746681993, - "narHash": "sha256-w3mYEUnbBjMC01c6ZixEa6LIqyiTCU9eF3vv9YTesWs=", + "lastModified": 1746158597, + "narHash": "sha256-IugPXmlzFdAMxeqACtd40yLslezVDxUqPvpEn5LWcp4=", "owner": "rycee", "repo": "nur-expressions", - "rev": "1f0519b8b0d044ac3699b52e60586cbebbb7b6cb", + "rev": "47711ca43fc3f91fa566038cd2681812c6c3252d", "type": "gitlab" }, "original": { @@ -820,11 +820,11 @@ ] }, "locked": { - "lastModified": 1746585402, - "narHash": "sha256-Pf+ufu6bYNA1+KQKHnGMNEfTwpD9ZIcAeLoE2yPWIP0=", + "lastModified": 1744252416, + "narHash": "sha256-Vrs2GxaL0tLi9GCIUrutHgPSr+g7GYCetu7argsNrB4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "72dd969389583664f87aa348b3458f2813693617", + "rev": "2af83121f9d2c5281796e60e2b048906a84b9fac", "type": "github" }, "original": { @@ -841,11 +841,11 @@ ] }, "locked": { - "lastModified": 1746671794, - "narHash": "sha256-V+mpk2frYIEm85iYf+KPDmCGG3zBRAEhbv0E3lHdG2U=", + "lastModified": 1746067100, + "narHash": "sha256-6JeEbboDvRjLwB9kzCnmWj+f+ZnMtKOe5c2F1VBpaTs=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "ceec434b8741c66bb8df5db70d7e629a9d9c598f", + "rev": "026e8fedefd6b167d92ed04b195c658d95ffc7a5", "type": "github" }, "original": { @@ -861,11 +861,11 @@ ] }, "locked": { - "lastModified": 1746485181, - "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", + "lastModified": 1745310711, + "narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", + "rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c", "type": "github" }, "original": { @@ -902,11 +902,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1746575057, - "narHash": "sha256-kBlPMNZXPzDG4HUmdqYpvjvVYkoDdDrVvO14cKgHaiU=", + "lastModified": 1746158690, + "narHash": "sha256-Pe2emz36QL8GOILXvvmH/agqkspZFrcOrQxv6uufaEc=", "owner": "danth", "repo": "stylix", - "rev": "685deb9bae2e4c463e953ff39bd54fd448feaf05", + "rev": "bc38629511dd9cc78c5ca37a6e546fa66330d50e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index bd51d13..a0c0423 100644 --- a/flake.nix +++ b/flake.nix @@ -168,23 +168,14 @@ flake-parts, flake-utils, ... - } @ inputs: - flake-parts.lib.mkFlake {inherit inputs;} ({flake-parts-lib, ...}: let - inherit (self) outputs; - inherit (flake-parts-lib) importApply; - rootPath = ./.; - nixos = importApply ./flake/nixos.nix {inherit rootPath outputs;}; - home = importApply ./flake/home.nix {inherit rootPath outputs;}; - deploy = importApply ./flake/deploy.nix {inherit outputs;}; - templates = importApply ./flake/templates.nix {inherit rootPath;}; - in { + } @ inputs: let + inherit (self) outputs; + rootPath = ./.; + in + flake-parts.lib.mkFlake {inherit inputs;} { systems = flake-utils.lib.defaultSystems; imports = [ inputs.home-manager.flakeModules.home-manager - nixos - home - deploy - templates ]; perSystem = { pkgs, @@ -204,31 +195,165 @@ inherit inputs; } ); - devShells.default = pkgs.mkShell { - packages = with pkgs; [ - nixd - typos - just - nvfetcher - ]; - }; }; - flake = { - overlays = { - modifications = import ./overlays/modifications {inherit inputs outputs;}; - additions = import ./overlays/additions {inherit inputs outputs;}; - }; - nix.settings = { - # substituters shared in home-manager and nixos configuration - substituters = let - cachix = x: "https://${x}.cachix.org"; + flake = + { + nix.settings = { + # substituters shared in home-manager and nixos configuration + substituters = let + cachix = x: "https://${x}.cachix.org"; + in + nixpkgs.lib.flatten [ + (cachix "nix-community") + "https://cache.nixos.org" + (cachix "cosmic") + ]; + }; + + nixosModules.default = import ./nixos/modules; + + overlays = { + modifications = import ./overlays/modifications {inherit inputs outputs;}; + additions = import ./overlays/additions {inherit inputs outputs;}; + }; + + nixosConfigurations = let + nixosConfigDir = ./nixos/configurations; + makeNixConfiguration = hostName: + nixpkgs.lib.nixosSystem { + modules = + [outputs.nixosModules.default] + ++ [ + ( + let + dirPath = nixosConfigDir + "/${hostName}"; + filePath = nixosConfigDir + "/${hostName}.nix"; + in + if builtins.pathExists dirPath + then dirPath + else filePath + ) + ]; + specialArgs = {inherit inputs outputs rootPath;}; + }; in - nixpkgs.lib.flatten [ - (cachix "nix-community") - "https://cache.nixos.org" - (cachix "cosmic") - ]; - }; - }; - }); + nixosConfigDir + |> builtins.readDir + |> builtins.attrNames + |> map (f: nixpkgs.lib.removeSuffix ".nix" f) + |> map (name: { + inherit name; + value = makeNixConfiguration name; + }) + |> builtins.listToAttrs; + } + // ( + let + mkHomeConfig = { + hostName, + unixName ? "david", + system ? "x86_64-linux", + nixpkgs ? inputs.nixpkgs, + home-manager ? inputs.home-manager, + }: { + "${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages."${system}"; + modules = + [ + "${toString ./home}/${unixName}/configurations/${hostName}" + ] + ++ (with outputs.homeModules; [ + default + extra + ]) + ++ [ + outputs.homeModules."${unixName}" + ]; + extraSpecialArgs = { + inherit + inputs + outputs + unixName + hostName + system + rootPath + ; + }; + }; + }; + in { + homeConfigurations = + nixpkgs.lib.foldr (a: b: a // b) {} ( + map (hostName: mkHomeConfig {inherit hostName;}) [ + "Tytonidae" + "Akun" + ] + ) + // mkHomeConfig { + hostName = "Cape"; + unixName = "alice"; + }; + homeModules = + { + default = import ./home/modules; + extra = import ./home/extra; + } + // ( + ./home + |> builtins.readDir + |> nixpkgs.lib.filterAttrs (key: value: value == "directory") + |> nixpkgs.lib.filterAttrs ( + key: value: + !builtins.elem key [ + "modules" + "extra" + ] + ) + |> builtins.attrNames + |> map (name: { + name = name; + value = import "${toString ./home}/${name}/modules"; + }) + |> builtins.listToAttrs + ); + } + ) + // ( + let + mkDeployNode = { + hostName, + unixName ? "deploy", + system ? "x86_64-linux", + sshName ? hostName, + }: { + "${hostName}" = { + hostname = "${sshName}"; + sshUser = "${unixName}"; + interactiveSudo = true; + profiles = { + system = { + user = "root"; + path = + inputs.deploy-rs.lib."${system}".activate.nixos + self.outputs.nixosConfigurations."${hostName}"; + }; + }; + }; + }; + in { + deploy.nodes = + [ + "Cape" + "Akun" + ] + |> map ( + hostName: + mkDeployNode { + inherit hostName; + } + ) + |> nixpkgs.lib.foldr (a: b: a // b) {}; + } + ); + }; } diff --git a/flake/deploy.nix b/flake/deploy.nix deleted file mode 100644 index 5741f9b..0000000 --- a/flake/deploy.nix +++ /dev/null @@ -1,49 +0,0 @@ -{outputs}: { - lib, - inputs, - flake-parts-lib, - ... -}: let - mkDeployNode = { - hostName, - unixName ? "deploy", - system ? "x86_64-linux", - sshName ? hostName, - }: { - "${hostName}" = { - hostname = "${sshName}"; - sshUser = "${unixName}"; - interactiveSudo = true; - profiles = { - system = { - user = "root"; - path = - inputs.deploy-rs.lib."${system}".activate.nixos - outputs.nixosConfigurations."${hostName}"; - }; - }; - }; - }; -in { - options = { - flake = flake-parts-lib.mkSubmoduleOptions { - deploy = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - }; - }; - }; - config = { - flake.deploy.nodes = - [ - "Cape" - "Akun" - ] - |> map ( - hostName: - mkDeployNode { - inherit hostName; - } - ) - |> lib.foldr (a: b: a // b) {}; - }; -} diff --git a/flake/home.nix b/flake/home.nix deleted file mode 100644 index 43024c1..0000000 --- a/flake/home.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - outputs, - rootPath, -}: { - lib, - inputs, - ... -}: let - homeModules = - { - default = import "${toString rootPath}/home/modules"; - extra = import "${toString rootPath}/home/extra"; - } - // ( - (rootPath + "/home") - |> builtins.readDir - |> lib.filterAttrs (key: value: value == "directory") - |> lib.filterAttrs ( - key: value: - !builtins.elem key [ - "modules" - "extra" - ] - ) - |> builtins.attrNames - |> map (name: { - name = name; - value = import "${toString rootPath}/home/${name}/modules"; - }) - |> builtins.listToAttrs - ); - mkHomeConfig = { - hostName, - unixName ? "david", - system ? "x86_64-linux", - nixpkgs ? inputs.nixpkgs, - home-manager ? inputs.home-manager, - }: { - "${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages."${system}"; - modules = - [ - "${toString rootPath}/home/${unixName}/configurations/${hostName}" - ] - ++ (with homeModules; [ - default - extra - ]) - ++ [ - homeModules."${unixName}" - ]; - extraSpecialArgs = { - inherit - inputs - outputs - unixName - hostName - system - rootPath - ; - }; - }; - }; -in { - flake = { - homeConfigurations = - lib.foldr (a: b: a // b) {} ( - map (hostName: mkHomeConfig {inherit hostName;}) [ - "Tytonidae" - "Akun" - ] - ) - // mkHomeConfig { - hostName = "Cape"; - unixName = "alice"; - }; - inherit homeModules; - }; -} diff --git a/flake/nixos.nix b/flake/nixos.nix deleted file mode 100644 index 519cab5..0000000 --- a/flake/nixos.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - rootPath, - outputs, -}: {inputs, ...}: let - defaultNixosModule = import (rootPath + "/nixos/modules"); - inherit (inputs.nixpkgs) lib; -in { - flake = { - nixosModules.default = defaultNixosModule; - nixosConfigurations = let - nixosConfigDir = rootPath + "/nixos/configurations"; - makeNixConfiguration = hostName: - lib.nixosSystem { - modules = - [defaultNixosModule] - ++ [ - ( - let - dirPath = nixosConfigDir + "/${hostName}"; - filePath = nixosConfigDir + "/${hostName}.nix"; - in - if builtins.pathExists dirPath - then dirPath - else filePath - ) - ]; - specialArgs = { - inherit inputs outputs rootPath; - }; - }; - in - nixosConfigDir - |> builtins.readDir - |> builtins.attrNames - |> map (f: lib.removeSuffix ".nix" f) - |> map (name: { - inherit name; - value = makeNixConfiguration name; - }) - |> builtins.listToAttrs; - }; -} diff --git a/flake/templates.nix b/flake/templates.nix deleted file mode 100644 index 7f71168..0000000 --- a/flake/templates.nix +++ /dev/null @@ -1,16 +0,0 @@ -{rootPath, ...}: { - flake-parts-lib, - lib, - ... -}: { - options = { - flake = flake-parts-lib.mkSubmoduleOptions { - templates = lib.mkOption { - type = lib.types.lazyAttrsOf lib.types.raw; - }; - }; - }; - config = { - flake.templates = import (rootPath + "/templates"); - }; -} diff --git a/home/david/configurations/Akun/niri.nix b/home/david/configurations/Akun/niri.nix index f2ce7ec..02e597f 100644 --- a/home/david/configurations/Akun/niri.nix +++ b/home/david/configurations/Akun/niri.nix @@ -2,7 +2,7 @@ inherit (inputs.niri-flake.lib.kdl) node leaf plain flag; in { david.programs.niri = { - DISPLAY = ":1"; + enable = true; extraConfig = let output = node "output"; in [ diff --git a/home/david/configurations/Tytonidae/default.nix b/home/david/configurations/Tytonidae/default.nix index a080a60..964ad5c 100644 --- a/home/david/configurations/Tytonidae/default.nix +++ b/home/david/configurations/Tytonidae/default.nix @@ -88,6 +88,7 @@ kdePackages.kdenlive fd viu + just android-tools ]; } diff --git a/home/david/configurations/Tytonidae/niri.nix b/home/david/configurations/Tytonidae/niri.nix index 86c00ba..dc6c1af 100644 --- a/home/david/configurations/Tytonidae/niri.nix +++ b/home/david/configurations/Tytonidae/niri.nix @@ -2,20 +2,10 @@ inherit (inputs.niri-flake.lib.kdl) node leaf plain flag; in { david.programs.niri = { - DISPLAY = ":1"; + enable = true; extraConfig = let output = node "output"; in [ - (output "DP-3" [ - (leaf "mode" "2560x1440@169.900") - (leaf "scale" 1.0) - (leaf "position" { - x = 0; - y = 0; - }) - (leaf "transform" "normal") - (flag "focus-at-startup") - ]) (output "DP-1" [ (leaf "mode" "2560x1440@169.900") (leaf "scale" 1.0) diff --git a/home/david/modules/default.nix b/home/david/modules/default.nix index d126544..f1ab621 100644 --- a/home/david/modules/default.nix +++ b/home/david/modules/default.nix @@ -5,12 +5,6 @@ ./emails.nix ]; config = { - youthlic.programs = { - zoxide.enable = true; - fzf.enable = true; - yazi.enable = true; - eza.enable = true; - }; services.mpris-proxy.enable = true; home.packages = with pkgs; [ spacer diff --git a/home/david/modules/programs/niri/config.nix b/home/david/modules/programs/niri/config.nix index 42382b6..77c1f6f 100644 --- a/home/david/modules/programs/niri/config.nix +++ b/home/david/modules/programs/niri/config.nix @@ -2,9 +2,8 @@ config, pkgs, lib, + osConfig, inputs, - osConfig ? null, - DISPLAY, ... }: let inherit (lib) getExe getExe'; @@ -27,18 +26,19 @@ plain ; - sh = getExe' config.programs.bash.package "sh"; + DISPLAY = ":1"; + + bash = getExe config.programs.bash.package; swaylock = getExe config.programs.swaylock.package; fuzzel = getExe config.programs.fuzzel.package; waybar = getExe config.programs.waybar.package; swaync = getExe config.services.swaync.package; - fcitx5 = lib.getExe' osConfig.i18n.inputMethod.package "fcitx5"; - xwayland-satellite = lib.getExe pkgs.xwayland-satellite; - sleep = lib.getExe' pkgs.coreutils "sleep"; + fcitx5 = getExe' osConfig.i18n.inputMethod.package "fcitx5"; polkit-kde-agent = getExe' pkgs.kdePackages.polkit-kde-agent-1 "polkit-kde-agent"; wpctl = getExe' pkgs.wireplumber "wpctl"; swaybg = getExe pkgs.swaybg; + xwayland-satellite = getExe pkgs.xwayland-satellite; ghostty = getExe config.programs.ghostty.package; wl-paste = getExe' pkgs.wl-clipboard "wl-paste"; wl-copy = getExe' pkgs.wl-clipboard "wl-copy"; @@ -50,7 +50,7 @@ in in [ (plain "binds" [ (plain "Mod+V" [ - (spawn [sh "-c" "${cliphist} list | ${fuzzel} --dmenu | ${cliphist} decode | ${wl-copy}"]) + (spawn [bash "-c" "${cliphist} list | ${fuzzel} --dmenu | ${cliphist} decode | ${wl-copy}"]) ]) (plain "Mod+Shift+P" [ (spawn [swaylock "--screenshots" "--clock" "--indicator" "--indicator-radius" "100" "--indicator-thickness" "7" "--effect-blur" "7x5" "--effect-vignette" "0.5:0.5" "--grace" "2" "--fade-in" "0.5"]) @@ -321,34 +321,34 @@ in (plain "Mod+Period" [ (flag "expel-window-from-column") ]) - (node "Mod+R" {repeat = false;} [ + (plain "Mod+R" [ (flag "switch-preset-column-width") ]) - (node "Mod+Shift+R" {repeat = false;} [ + (plain "Mod+Shift+R" [ (flag "switch-preset-window-height") ]) (plain "Mod+Ctrl+R" [ (flag "reset-window-height") ]) - (node "Mod+M" {repeat = false;} [ + (plain "Mod+M" [ (flag "maximize-column") ]) - (node "Mod+Shift+M" {repeat = false;} [ + (plain "Mod+Shift+M" [ (flag "fullscreen-window") ]) (plain "Mod+Z" [ (flag "center-column") ]) - (node "Mod+Minus" {repeat = false;} [ + (plain "Mod+Minus" [ (leaf "set-column-width" "-10%") ]) - (node "Mod+Equal" {repeat = false;} [ + (plain "Mod+Equal" [ (leaf "set-column-width" "+10%") ]) - (node "Mod+Shift+Minus" {repeat = false;} [ + (plain "Mod+Shift+Minus" [ (leaf "set-window-height" "-10%") ]) - (node "Mod+Shift+Equal" {repeat = false;} [ + (plain "Mod+Shift+Equal" [ (leaf "set-window-height" "+10%") ]) (plain "Print" [ @@ -390,10 +390,10 @@ in (spawn-at-startup [waybar]) (spawn-at-startup [swaync]) (spawn-at-startup [swaybg "-i" "${config.home.homeDirectory}/wallpaper/01.png"]) + (spawn-at-startup [fcitx5 "-d" "--replace"]) + (spawn-at-startup [xwayland-satellite DISPLAY]) (spawn-at-startup [polkit-kde-agent]) (spawn-at-startup [wl-paste "--watch" cliphist "store"]) - (spawn-at-startup [xwayland-satellite "${DISPLAY}"]) - (spawn-at-startup [sh "-c" "${sleep} 10; ${fcitx5} --replace"]) (plain "input" [ (plain "touchpad" [ (leaf "click-method" "clickfinger") diff --git a/home/david/modules/programs/niri/default.nix b/home/david/modules/programs/niri/default.nix index f5cdddb..2654b7e 100644 --- a/home/david/modules/programs/niri/default.nix +++ b/home/david/modules/programs/niri/default.nix @@ -13,31 +13,14 @@ in { extraConfig = lib.mkOption { type = inputs.niri-flake.lib.kdl.types.kdl-document; }; - DISPLAY = lib.mkOption { - type = lib.types.str; - }; }; }; - config = lib.mkMerge [ - { - david.programs.niri.enable = config.youthlic.programs.niri.enable; - } - ( - lib.mkIf cfg.enable { - home.sessionVariables = { - inherit (cfg) DISPLAY; - }; - youthlic.programs.niri = { - # settings = lib.mkMerge [(import ./settings.nix args) cfg.settings]; - config = - (lib.toList (import ./config.nix (args - // { - inherit (cfg) DISPLAY; - }))) - ++ (lib.toList cfg.extraConfig); - }; - david.programs.wluma.enable = true; - } - ) - ]; + config = lib.mkIf cfg.enable { + youthlic.programs.niri = { + enable = true; + # settings = lib.mkMerge [(import ./settings.nix args) cfg.settings]; + config = (lib.toList (import ./config.nix args)) ++ (lib.toList cfg.extraConfig); + }; + david.programs.wluma.enable = true; + }; } diff --git a/home/modules/programs/bash.nix b/home/modules/programs/bash.nix deleted file mode 100644 index 990a853..0000000 --- a/home/modules/programs/bash.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.bash; -in { - options = { - youthlic.programs.bash = { - enable = lib.mkEnableOption "bash"; - }; - }; - config = lib.mkIf cfg.enable { - programs = { - bash = { - enable = true; - }; - }; - }; -} diff --git a/home/modules/programs/default.nix b/home/modules/programs/default.nix index 34ab7ab..3c1f93e 100644 --- a/home/modules/programs/default.nix +++ b/home/modules/programs/default.nix @@ -4,8 +4,7 @@ ./rustypaste-cli.nix ./atuin.nix ./firefox.nix - ./bash.nix - ./fish.nix + ./shell ./kvm.nix ./ghostty.nix ./wluma.nix @@ -26,9 +25,5 @@ ./waybar.nix ./jujutsu.nix ./espanso.nix - ./yazi.nix - ./zoxide.nix - ./fzf.nix - ./eza.nix ]; } diff --git a/home/modules/programs/eza.nix b/home/modules/programs/eza.nix deleted file mode 100644 index 0eddc82..0000000 --- a/home/modules/programs/eza.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.eza; -in { - options = { - youthlic.programs.eza = { - enable = lib.mkEnableOption "eza"; - }; - }; - config = { - programs.eza = lib.mkIf cfg.enable { - enable = true; - }; - }; -} diff --git a/home/modules/programs/fish.nix b/home/modules/programs/fish.nix deleted file mode 100644 index 2a0deb4..0000000 --- a/home/modules/programs/fish.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.fish; -in { - options = { - youthlic.programs.fish = { - enable = lib.mkEnableOption "fish"; - }; - }; - config = lib.mkIf cfg.enable { - programs = { - fish = { - enable = true; - interactiveShellInit = '' - fish_vi_key_bindings - ''; - functions = { - __fish_command_not_found_handler = { - body = "__fish_default_command_not_found_handler $argv[1]"; - onEvent = "fish_command_not_found"; - }; - fish_greeting = { - body = '' - fastfetch - ''; - }; - }; - }; - fastfetch.enable = true; - }; - }; -} diff --git a/home/modules/programs/fzf.nix b/home/modules/programs/fzf.nix deleted file mode 100644 index 5132f09..0000000 --- a/home/modules/programs/fzf.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.fzf; -in { - options = { - youthlic.programs.fzf = { - enable = lib.mkEnableOption "fzf"; - }; - }; - config = { - programs.fzf = lib.mkIf cfg.enable { - enable = true; - }; - }; -} diff --git a/home/modules/programs/niri.nix b/home/modules/programs/niri.nix index 663ad38..e68662d 100644 --- a/home/modules/programs/niri.nix +++ b/home/modules/programs/niri.nix @@ -20,62 +20,55 @@ in { }; }; }; - config = lib.mkMerge [ - { - youthlic.programs.niri.enable = osConfig.youthlic.gui.enabled == "niri"; - } - ( - lib.mkIf cfg.enable { - home.packages = - (with pkgs; [ - swaynotificationcenter - swaybg - xwayland-satellite - kdePackages.polkit-kde-agent-1 - wl-clipboard - cliphist - ]) - ++ [niri]; - qt = { - enable = true; - }; - xdg.portal = { - configPackages = [niri]; - enable = true; - extraPortals = lib.mkIf ( - !niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures - ) [pkgs.xdg-desktop-portal-gnome]; - }; - xdg.configFile = let - qtctConf = - '' - [Appearance] - standard_dialogs=xdgdesktopportal - '' - + lib.optionalString (config.qt.style ? name) '' - style=${config.qt.style.name} - ''; - in { - "qt5ct/qt5ct.conf" = lib.mkForce { - text = qtctConf; - }; - "qt6ct/qt6ct.conf" = lib.mkForce { - text = qtctConf; - }; - }; - youthlic.programs = { - fuzzel.enable = true; - wluma.enable = true; - waybar.enable = true; - swaync.enable = true; - swaylock.enable = true; - }; - programs.niri = { - # settings = cfg.settings; - config = cfg.config; - package = niri; - }; - } - ) - ]; + config = lib.mkIf cfg.enable { + home.packages = + (with pkgs; [ + swaynotificationcenter + swaybg + xwayland-satellite + kdePackages.polkit-kde-agent-1 + wl-clipboard + cliphist + ]) + ++ [niri]; + qt = { + enable = true; + }; + xdg.portal = { + configPackages = [niri]; + enable = true; + extraPortals = lib.mkIf ( + !niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures + ) [pkgs.xdg-desktop-portal-gnome]; + }; + xdg.configFile = let + qtctConf = + '' + [Appearance] + standard_dialogs=xdgdesktopportal + '' + + lib.optionalString (config.qt.style ? name) '' + style=${config.qt.style.name} + ''; + in { + "qt5ct/qt5ct.conf" = lib.mkForce { + text = qtctConf; + }; + "qt6ct/qt6ct.conf" = lib.mkForce { + text = qtctConf; + }; + }; + youthlic.programs = { + fuzzel.enable = true; + wluma.enable = true; + waybar.enable = true; + swaync.enable = true; + swaylock.enable = true; + }; + programs.niri = { + # settings = cfg.settings; + config = cfg.config; + package = niri; + }; + }; } diff --git a/home/modules/programs/shell/default.nix b/home/modules/programs/shell/default.nix new file mode 100644 index 0000000..2478f02 --- /dev/null +++ b/home/modules/programs/shell/default.nix @@ -0,0 +1,77 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkEnableOption mkIf mkMerge; + fish-cfg = config.youthlic.programs.fish; + bash-cfg = config.youthlic.programs.bash; + cfg-helper = conf: + mkMerge [ + conf + (mkIf fish-cfg.enable { + enableFishIntegration = true; + }) + (mkIf bash-cfg.enable { + enableBashIntegration = true; + }) + ]; +in { + options = { + youthlic.programs = { + fish = { + enable = mkEnableOption "fish"; + }; + bash = { + enable = mkEnableOption "bash"; + }; + }; + }; + config = mkMerge [ + { + programs = { + zoxide = cfg-helper { + enable = true; + }; + yazi = cfg-helper { + enable = true; + }; + fzf = cfg-helper { + enable = true; + }; + eza = cfg-helper { + enable = true; + }; + }; + } + (mkIf fish-cfg.enable { + programs = { + fish = { + enable = true; + interactiveShellInit = '' + fish_vi_key_bindings + ''; + functions = { + __fish_command_not_found_handler = { + body = "__fish_default_command_not_found_handler $argv[1]"; + onEvent = "fish_command_not_found"; + }; + fish_greeting = { + body = '' + fastfetch + ''; + }; + }; + }; + fastfetch.enable = true; + }; + }) + (mkIf bash-cfg.enable { + programs = { + bash = { + enable = true; + }; + }; + }) + ]; +} diff --git a/home/modules/programs/yazi.nix b/home/modules/programs/yazi.nix deleted file mode 100644 index 202835b..0000000 --- a/home/modules/programs/yazi.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.yazi; -in { - options = { - youthlic.programs.yazi = { - enable = lib.mkEnableOption "yazi"; - }; - }; - config = { - programs.yazi = lib.mkIf cfg.enable { - enable = true; - }; - }; -} diff --git a/home/modules/programs/zoxide.nix b/home/modules/programs/zoxide.nix deleted file mode 100644 index 1267b9c..0000000 --- a/home/modules/programs/zoxide.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.zoxide; -in { - options = { - youthlic.programs.zoxide = { - enable = lib.mkEnableOption "zoxide"; - }; - }; - config = { - programs.zoxide = lib.mkIf cfg.enable { - enable = true; - }; - }; -} diff --git a/nixos/configurations/Tytonidae/default.nix b/nixos/configurations/Tytonidae/default.nix index 6310aac..f19f633 100644 --- a/nixos/configurations/Tytonidae/default.nix +++ b/nixos/configurations/Tytonidae/default.nix @@ -19,8 +19,6 @@ ./networking.nix ./disk-config.nix ./hardware.nix - ./specialisation/kde.nix - ./specialisation/niri-hybrid.nix ]; youthlic = { @@ -29,7 +27,6 @@ unixName = "david"; hostName = "Tytonidae"; }; - hardware.asus.enable = true; i18n.enable = true; programs = { guix.enable = true; @@ -45,11 +42,27 @@ transmission.enable = true; nix-ld.enable = true; juicity.client.enable = true; + asusd.enable = true; owncast.enable = true; minio.enable = true; }; }; + # specialisation = { + # cosmic = { + # inheritParentConfig = true; + # configuration = { + # youthlic.gui.enabled = lib.mkForce "cosmic"; + # }; + # }; + # kde = { + # inheritParentConfig = true; + # configuration = { + # youthlic.gui.enabled = lib.mkForce "kde"; + # }; + # }; + # }; + programs.gnupg.agent = { enable = true; }; @@ -79,12 +92,14 @@ jq onefetch vesktop + gg aria2 juicity waypipe wineWow64Packages.waylandFull iperf3 + nvfetcher ]; environment.variables.EDITOR = "hx"; diff --git a/nixos/configurations/Tytonidae/gui.nix b/nixos/configurations/Tytonidae/gui.nix index 91d916c..fc9c3f0 100644 --- a/nixos/configurations/Tytonidae/gui.nix +++ b/nixos/configurations/Tytonidae/gui.nix @@ -1,6 +1,6 @@ {pkgs, ...}: let extraConfig = '' - output "DP-3" { + output "DP-1" { mode "2560x1440@169.900" scale 1.0 position x=0 y=0 @@ -15,7 +15,7 @@ } window-rule { match app-id="apps.regreet" - open-on-output "DP-3" + open-on-output "DP-1" } ''; in { diff --git a/nixos/configurations/Tytonidae/specialisation/kde.nix b/nixos/configurations/Tytonidae/specialisation/kde.nix deleted file mode 100644 index 91e0f65..0000000 --- a/nixos/configurations/Tytonidae/specialisation/kde.nix +++ /dev/null @@ -1,8 +0,0 @@ -{lib, ...}: { - config.specialisation.kde = { - inheritParentConfig = true; - configuration = { - youthlic.gui.enabled = lib.mkForce "kde"; - }; - }; -} diff --git a/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix b/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix deleted file mode 100644 index ca1ea8b..0000000 --- a/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix +++ /dev/null @@ -1,28 +0,0 @@ -{lib, ...}: let - extraConfig = '' - output "DP-1" { - mode "2560x1440@169.900" - scale 1.0 - position x=0 y=0 - transform "normal" - focus-at-startup - } - output "eDP-1" { - mode "2560x1440@165.003" - scale 1.5 - position x=2560 y=0 - transform "normal" - } - window-rule { - match app-id="apps.regreet" - open-on-output "DP-1" - } - ''; -in { - config.specialisation.niri-hybrid = { - inheritParentConfig = true; - configuration = { - youthlic.gui.niri.extraConfig = lib.mkForce extraConfig; - }; - }; -} diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index d10b841..2712376 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -24,7 +24,6 @@ ./i18n.nix ./gui ./programs - ./hardware.nix ]; config = { diff --git a/nixos/modules/gui/cosmic.nix b/nixos/modules/gui/cosmic.nix index 40d616a..ffed1dc 100644 --- a/nixos/modules/gui/cosmic.nix +++ b/nixos/modules/gui/cosmic.nix @@ -13,7 +13,7 @@ in { display = 0; enable = true; xkb = { - layout = "us"; + layout = "cn"; variant = ""; }; }; diff --git a/nixos/modules/gui/kde.nix b/nixos/modules/gui/kde.nix index 9651516..38b2c29 100644 --- a/nixos/modules/gui/kde.nix +++ b/nixos/modules/gui/kde.nix @@ -6,13 +6,14 @@ cfg = config.youthlic.gui; in { config = lib.mkIf (cfg.enabled == "kde") { + stylix.targets.qt.platform = "kde"; services = { desktopManager.plasma6.enable = true; displayManager.sddm.enable = true; xserver = { enable = true; xkb = { - layout = "us"; + layout = "cn"; variant = ""; }; }; diff --git a/nixos/modules/gui/niri.nix b/nixos/modules/gui/niri.nix index 4fd56e0..faeec95 100644 --- a/nixos/modules/gui/niri.nix +++ b/nixos/modules/gui/niri.nix @@ -97,6 +97,10 @@ in { layout = "us"; variant = ""; }; + # displayManager.gdm = { + # enable = true; + # wayland = true; + # }; }; }; programs = { diff --git a/nixos/modules/hardware.nix b/nixos/modules/hardware.nix deleted file mode 100644 index ba31c29..0000000 --- a/nixos/modules/hardware.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.hardware; -in { - options = { - youthlic.hardware = { - asus = { - enable = lib.mkEnableOption "asus"; - }; - }; - }; - config = lib.mkMerge [ - (lib.mkIf cfg.asus.enable { - youthlic.programs = { - asusd.enable = true; - supergfxd.enable = true; - }; - }) - ]; -} diff --git a/nixos/modules/programs/asusd.nix b/nixos/modules/programs/asusd.nix index c116c39..cd8e042 100644 --- a/nixos/modules/programs/asusd.nix +++ b/nixos/modules/programs/asusd.nix @@ -13,7 +13,6 @@ in { config = lib.mkIf cfg.enable { services.asusd = { enable = true; - enableUserService = true; }; }; } diff --git a/nixos/modules/programs/default.nix b/nixos/modules/programs/default.nix index 26dafe6..6e2ddd3 100644 --- a/nixos/modules/programs/default.nix +++ b/nixos/modules/programs/default.nix @@ -26,6 +26,5 @@ ./asusd.nix ./owncast.nix ./minio.nix - ./supergfxd.nix ]; } diff --git a/nixos/modules/programs/supergfxd.nix b/nixos/modules/programs/supergfxd.nix deleted file mode 100644 index 18318ea..0000000 --- a/nixos/modules/programs/supergfxd.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.youthlic.programs.supergfxd; -in { - options = { - youthlic.programs.supergfxd = { - enable = lib.mkEnableOption "supergfxd"; - }; - }; - config = lib.mkIf cfg.enable { - services.supergfxd = { - enable = true; - }; - }; -} diff --git a/overlays/additions/rime-ice.nix b/overlays/additions/rime-ice.nix index a54e748..da0c133 100644 --- a/overlays/additions/rime-ice.nix +++ b/overlays/additions/rime-ice.nix @@ -1,5 +1,6 @@ {outputs, ...}: final: prev: let - inherit (prev.stdenv.hostPlatform) system; + inherit (final) stdenv; + inherit (stdenv.hostPlatform) system; in { rime-ice = outputs.packages."${system}".rime-ice; } diff --git a/overlays/modifications/juicity.nix b/overlays/modifications/juicity.nix index 61c970c..52f5127 100644 --- a/overlays/modifications/juicity.nix +++ b/overlays/modifications/juicity.nix @@ -1,5 +1,6 @@ {outputs, ...}: final: prev: let - inherit (prev.stdenv.hostPlatform) system; + inherit (final) stdenv; + inherit (stdenv.hostPlatform) system; in { juicity = outputs.packages."${system}".juicity; } diff --git a/overlays/modifications/spotifyx.nix b/overlays/modifications/spotifyx.nix index 820b1d3..da92346 100644 --- a/overlays/modifications/spotifyx.nix +++ b/overlays/modifications/spotifyx.nix @@ -1,5 +1,6 @@ {outputs, ...}: final: prev: let - inherit (prev.stdenv.hostPlatform) system; + inherit (final) stdenv; + inherit (stdenv.hostPlatform) system; in { spotify = outputs.packages."${system}".spotifyx; } diff --git a/templates/default.nix b/templates/default.nix deleted file mode 100644 index 7f50671..0000000 --- a/templates/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - rust = { - path = ./rust; - description = "Rust template."; - }; -} diff --git a/templates/rust/.envrc b/templates/rust/.envrc deleted file mode 100644 index 46942de..0000000 --- a/templates/rust/.envrc +++ /dev/null @@ -1,3 +0,0 @@ -watch_file *.nix flake.lock - -use flake diff --git a/templates/rust/.gitignore b/templates/rust/.gitignore deleted file mode 100644 index bd32e74..0000000 --- a/templates/rust/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.direnv -target diff --git a/templates/rust/Cargo.lock b/templates/rust/Cargo.lock deleted file mode 100644 index b9d42e1..0000000 --- a/templates/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "rust" -version = "0.1.0" diff --git a/templates/rust/Cargo.toml b/templates/rust/Cargo.toml deleted file mode 100644 index 1c61e9e..0000000 --- a/templates/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "rust" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/templates/rust/flake.lock b/templates/rust/flake.lock deleted file mode 100644 index 91e00c3..0000000 --- a/templates/rust/flake.lock +++ /dev/null @@ -1,82 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1746300365, - "narHash": "sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f21e4546e3ede7ae34d12a84602a22246b31f7e0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1746326315, - "narHash": "sha256-IDqSls/r6yBfdOBRSMQ/noTUoigmsKnTQ7TqpsBtN4Y=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "dd280c436961ec5adccf0135efe5b66a23d84497", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix deleted file mode 100644 index 2a8f295..0000000 --- a/templates/rust/flake.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-utils = { - url = "github:numtide/flake-utils"; - }; - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; - }; - }; - outputs = { - flake-utils, - nixpkgs, - rust-overlay, - ... - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { - inherit system; - overlays = [(import rust-overlay)]; - }; - rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; - rustPlatform = pkgs.makeRustPlatform { - cargo = rustToolchain; - rustc = rustToolchain; - }; - in { - devShells.default = pkgs.mkShell { - packages = with pkgs; [ - rust-analyzer - rustToolchain - ]; - }; - }); -} diff --git a/templates/rust/rust-toolchain.toml b/templates/rust/rust-toolchain.toml deleted file mode 100644 index 02cb8fc..0000000 --- a/templates/rust/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "stable" -profile = "default" diff --git a/templates/rust/src/main.rs b/templates/rust/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/templates/rust/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}