diff --git a/flake.lock b/flake.lock index 263a3f7..d78bd5f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,157 @@ { "nodes": { + "crate2nix": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1704324482, + "narHash": "sha256-fQkuahBX1xEi9G6GfChuCnbJ0XYIYALWpMQWGsHkKw8=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "a4f2cecea7b78a7e6e63ae62f40502286c67424a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "crate2nix", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "niri", + "crate2nix", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1701787589, + "narHash": "sha256-ce+oQR4Zq9VOsLoh9bZT8Ip9PaMLcjjBUHVPzW5d7Cw=", + "owner": "numtide", + "repo": "devshell", + "rev": "44ddedcbcfc2d52a76b64fb6122f209881bd3e1e", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "niri", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704152458, + "narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "88a2cd8166694ba0b6cb374700799cec53aef527", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1704152458, + "narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "88a2cd8166694ba0b6cb374700799cec53aef527", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "niri", + "crate2nix", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -20,6 +172,45 @@ "type": "github" } }, + "niri": { + "inputs": { + "crate2nix": "crate2nix", + "flake-parts": "flake-parts_2", + "niri-src": "niri-src", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704478569, + "narHash": "sha256-SMmoJhK0ea1M57m1xX0jjR2xNhHfcRhi5vEOgKRSA8k=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "c31147cd08ed6d00c632a807bd80a3728185508d", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-src": { + "flake": false, + "locked": { + "lastModified": 1704291380, + "narHash": "sha256-H27TpCPFn/Nn46R6fxbGq7nrsakrhtr+f7REPhk3FHw=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "5cd31e5730160f9162502d2388dc00400c7a87ae", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1704124233, @@ -36,6 +227,35 @@ } }, "nixpkgs": { + "locked": { + "narHash": "sha256-C0o8AUyu8xYgJ36kOxJfXIroy9if/G6aJbNOpA5W0+M=", + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2311.553775%2Brev-32f63574c85fbc80e4ba1fbb932cde9619bad25e/018cc38e-9ebf-7e1d-8cb1-6f7f0878daf3/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2311.553775.tar.gz" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1703961334, "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", @@ -66,13 +286,74 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils", + "gitignore": "gitignore", + "nixpkgs": [ + "niri", + "crate2nix", + "nixpkgs" + ], + "nixpkgs-stable": [ + "niri", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703939133, + "narHash": "sha256-Gxe+mfOT6bL7wLC/tuT2F+V+Sb44jNr8YsJ3cyIl4Mo=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "9d3d7e18c6bc4473d7520200d4ddab12f8402d38", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", + "niri": "niri", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nur": "nur" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "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", diff --git a/flake.nix b/flake.nix index 72e8cbd..cf67c37 100644 --- a/flake.nix +++ b/flake.nix @@ -16,17 +16,23 @@ nur = { url = "github:nix-community/nur"; }; + + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { nixpkgs, home-manager, nixos-hardware, nur, ... }: + outputs = { nixpkgs, home-manager, nixos-hardware, nur, niri, ... }: { nixosConfigurations = { desktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./modules/system ./devices/desktop + ./modules/system + niri.nixosModules.default home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay @@ -43,10 +49,11 @@ surface = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./modules/system ./devices/surface nixos-hardware.nixosModules.microsoft-surface-pro-intel + ./modules/system + niri.nixosModules.default home-manager.nixosModules.home-manager { nixpkgs.overlays = [ nur.overlay diff --git a/modules/niri/default.nix b/modules/niri/default.nix new file mode 100644 index 0000000..90e31e2 --- /dev/null +++ b/modules/niri/default.nix @@ -0,0 +1,3 @@ +{ ... }: { + programs.niri.enable = true; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index 2f4a56c..48655f4 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -7,8 +7,8 @@ ./audio.nix ./fonts.nix ./docker.nix - ./virt.nix ../gnome + ../niri ]; # Allow packages from nixpkgs