From fa10da91f4d297e3bc78c3324f90b6a522c947a0 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Wed, 27 Sep 2023 11:54:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 209 ++++++-------------------------- flake.nix | 20 +-- hmModules/hyprland/default.nix | 21 ++-- hmModules/moonlight/default.nix | 3 + hmModules/shell/default.nix | 4 +- hmModules/waybar/default.nix | 2 +- hosts/default.nix | 11 +- hosts/mothership/default.nix | 5 +- hosts/thinkpad/default.nix | 4 +- modules/binfmt/default.nix | 2 +- modules/remote-xfce/default.nix | 28 +++++ 11 files changed, 98 insertions(+), 211 deletions(-) create mode 100644 hmModules/moonlight/default.nix create mode 100644 modules/remote-xfce/default.nix diff --git a/flake.lock b/flake.lock index 0022ec2..cbd8482 100644 --- a/flake.lock +++ b/flake.lock @@ -685,7 +685,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1687709756, @@ -945,73 +945,6 @@ "type": "github" } }, - "hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs_8", - "systems": "systems_3", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1693256615, - "narHash": "sha256-1EznFZBr21tuU795UzJFkBKU7aAv7sDCoSVGwzuvTFY=", - "owner": "hyprwm", - "repo": "hyprland", - "rev": "0a78f6031c8fcc6773f136fccde3d560aaac239d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprpaper": { - "inputs": { - "nixpkgs": [ - "nixpkgsUnstable" - ] - }, - "locked": { - "lastModified": 1681650457, - "narHash": "sha256-IGXRZrFGFqUeM5iDgP/ojbrd+gKL40PaFFAITxbkfZ0=", - "owner": "hyprwm", - "repo": "hyprpaper", - "rev": "3bfaac09f58ce31c33e1a56e7eaa606a87fe4c32", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprpaper", - "type": "github" - } - }, "kernel-src": { "flake": false, "locked": { @@ -1120,7 +1053,7 @@ "nil": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -1197,7 +1130,7 @@ }, "nixos-vscode-server": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1676501444, @@ -1398,6 +1331,22 @@ "type": "github" } }, + "nixpkgsUnstable": { + "locked": { + "lastModified": 1695644571, + "narHash": "sha256-asS9dCCdlt1lPq0DLwkVBbVoEKuEuz+Zi3DG7pR/RxA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6500b4580c2a1f3d0f980d32d285739d8e156d92", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgsV1": { "locked": { "lastModified": 1678500271, @@ -1414,20 +1363,6 @@ } }, "nixpkgs_10": { - "locked": { - "lastModified": 1672441588, - "narHash": "sha256-jx5kxOyeObnVD44HRebKYL3cjWrcKhhcDmEYm0/naDY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6a0d2701705c3cf6f42c15aa92b7885f1f8a477f", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_11": { "locked": { "lastModified": 1675942811, "narHash": "sha256-/v4Z9mJmADTpXrdIlAjFa1e+gkpIIROR670UVDQFwIw=", @@ -1442,7 +1377,7 @@ "type": "indirect" } }, - "nixpkgs_12": { + "nixpkgs_11": { "locked": { "lastModified": 1678470307, "narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=", @@ -1554,22 +1489,6 @@ } }, "nixpkgs_8": { - "locked": { - "lastModified": 1692638711, - "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "91a22f76cd1716f9d0149e8a5c68424bb691de15", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { "locked": { "lastModified": 1690441914, "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", @@ -1585,10 +1504,24 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1672441588, + "narHash": "sha256-jx5kxOyeObnVD44HRebKYL3cjWrcKhhcDmEYm0/naDY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6a0d2701705c3cf6f42c15aa92b7885f1f8a477f", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "nom": { "inputs": { "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_10", "pre-commit-hooks": "pre-commit-hooks" }, "locked": { @@ -1735,7 +1668,7 @@ "fan-control": "fan-control", "flake-parts": "flake-parts_4", "kernel-src": "kernel-src", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_11", "nixpkgs-kernel": "nixpkgs-kernel", "panfork": "panfork", "tow-boot": "tow-boot", @@ -1769,18 +1702,13 @@ "hercules-ci-effects": "hercules-ci-effects", "homeManager": "homeManager", "homeManagerGitWorkspace": "homeManagerGitWorkspace", - "hyprland": "hyprland", - "hyprpaper": "hyprpaper", "nil": "nil", "nix-serve-ng": "nix-serve-ng", "nixos-generators": "nixos-generators", "nixos-vscode-server": "nixos-vscode-server", "nixosHardware": "nixosHardware", "nixpkgsStable": "nixpkgsStable", - "nixpkgsUnstable": [ - "hyprland", - "nixpkgs" - ], + "nixpkgsUnstable": "nixpkgsUnstable", "nom": "nom", "nur": "nur", "pre-commit-hooks": "pre-commit-hooks_2", @@ -1922,21 +1850,6 @@ } }, "systems_3": { - "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_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -2053,54 +1966,6 @@ "repo": "flake-utils", "type": "github" } - }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1692976565, - "narHash": "sha256-eBKkG7tMxg92NskEn8dHRFY245JwjirWRoOZzW6DnUw=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "717ded9bb0191ea31bf4368be32e7a15fe1b8294", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "717ded9bb0191ea31bf4368be32e7a15fe1b8294", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691841170, - "narHash": "sha256-RCTm1/MVWYPnReMgyp7tr2ogGYo/pvw38jZaFwemgPU=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "57a3a41ba6b358109e4fc25c6a4706b5f7d93c6b", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 9911a6a..0e256eb 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,7 @@ inputs = { flakeParts.url = "github:hercules-ci/flake-parts"; - # nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixpkgsUnstable.follows = "hyprland/nixpkgs"; + nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.05"; nixosHardware.url = "github:NixOS/nixos-hardware"; homeManager = { @@ -33,13 +32,6 @@ rock5b.url = "github:aciceri/rock5b-nixos"; ccrEmacs.url = "github:aciceri/emacs"; # ccrEmacs.url = "/home/ccr/.config/emacs"; - hyprland = { - url = "github:hyprwm/hyprland"; - }; - hyprpaper = { - url = "github:hyprwm/hyprpaper"; - inputs.nixpkgs.follows = "nixpkgsUnstable"; - }; colmena = { url = "github:zhaofengli/colmena"; inputs = { @@ -77,7 +69,6 @@ inputs.nixpkgs.follows = "nixpkgsUnstable"; }; hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects"; - # nixpkgsImmich.url = "github:oddlama/nixpkgs/init-immich"; }; outputs = inputs @ {flakeParts, ...}: @@ -99,12 +90,5 @@ ]; }); - nixConfig = { - extra-substituters = [ - "https://hyprland.cachix.org" - ]; - extra-trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - ]; - }; + nixConfig = {}; } diff --git a/hmModules/hyprland/default.nix b/hmModules/hyprland/default.nix index b4cfd5b..a7307e3 100644 --- a/hmModules/hyprland/default.nix +++ b/hmModules/hyprland/default.nix @@ -26,7 +26,7 @@ in { ../swayidle ../mako ../gammastep - ../kitty + # ../kitty ../wezterm ]; @@ -88,12 +88,9 @@ in { } } - # monitor = DP-2, 1920x1200, 0x0, 1, transform, 3 - # monitor = DP-1, 2560x1440, 1200x320, 1 - # monitor = eDP-1, 1920x1080, 3760x230, 1 - - monitor = DP-2, 2560x1440, 1200x320, 1 + # monitor = DP-2, 2560x1440, 1200x320, 1, mirror monitor = eDP-1, 1920x1080, 3760x230, 1 + monitor = DP-1, 1920x1080, 0x0, 1, mirror, eDP-1 bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close @@ -183,12 +180,12 @@ in { bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default + animation = windows, 1, 3, myBezier + animation = windowsOut, 1, 3, default, popin 80% + animation = border, 1, 5, default + animation = borderangle, 1, 4, default + animation = fade, 1, 3, default + animation = workspaces, 1, 3, default } ''; }; diff --git a/hmModules/moonlight/default.nix b/hmModules/moonlight/default.nix new file mode 100644 index 0000000..653f421 --- /dev/null +++ b/hmModules/moonlight/default.nix @@ -0,0 +1,3 @@ +{pkgs, ...}: { + home.packages = [pkgs.moonlight-qt]; +} diff --git a/hmModules/shell/default.nix b/hmModules/shell/default.nix index 7f6da64..0752d6f 100644 --- a/hmModules/shell/default.nix +++ b/hmModules/shell/default.nix @@ -30,8 +30,8 @@ enable = true; settings = { character = { - success_symbol = "[λ](bold green)"; - error_symbol = "[λ](bold red)"; + success_symbol = "[👌](bold green)"; + error_symbol = "[🤌](bold red)"; }; nix_shell = { symbol = "❄ "; diff --git a/hmModules/waybar/default.nix b/hmModules/waybar/default.nix index 90794cf..29b9b44 100644 --- a/hmModules/waybar/default.nix +++ b/hmModules/waybar/default.nix @@ -24,9 +24,9 @@ ]; modules-center = ["wlr/window"]; modules-right = [ + "network" "tray" "pulseaudio" - "network" "cpu" "memory" "temperature" diff --git a/hosts/default.nix b/hosts/default.nix index 44e477e..8fa15b1 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -168,17 +168,24 @@ thinkpad = { extraModules = with inputs; [ nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen - hyprland.nixosModules.default ]; extraHmModules = with inputs; [ ccrEmacs.hmModules.default - hyprland.homeManagerModules.default + { + # TODO: remove after https://github.com/nix-community/home-manager/pull/3811 + imports = let + hmModules = "${inputs.homeManagerGitWorkspace}/modules"; + in [ + "${hmModules}/services/git-workspace.nix" + ]; + } ]; overlays = [inputs.nil.overlays.default]; secrets = { "thinkpad-wireguard-private-key" = {}; "cachix-personal-token".owner = "ccr"; "autistici-password".owner = "ccr"; + "git-workspace-tokens".owner = "ccr"; }; }; rock5b = { diff --git a/hosts/mothership/default.nix b/hosts/mothership/default.nix index f5d12c6..e2116a8 100644 --- a/hosts/mothership/default.nix +++ b/hosts/mothership/default.nix @@ -14,7 +14,7 @@ "ccr" "nix" # "vm-sala" - "vm-mara" + # "vm-mara" # "vm-ubuntu" # "hydra" "hercules-ci" @@ -23,8 +23,9 @@ "docker" # "minio" "proxy" - # "binfmt" + "binfmt" "xdg" + # "remote-xfce" ]; ccr = { diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 0950b16..fdddd17 100644 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -40,13 +40,14 @@ enable = true; autologin = true; modules = [ + "git-workspace" "cura" "digikam" "discord" "element" # "nheko" # "thunderbird" - "aerc" + # "aerc" "emacs" "firefox" "git" @@ -74,6 +75,7 @@ "remmina" "whatsapp" # "pantalaimon" + # "moonlight" ]; packages = with pkgs; [ comma diff --git a/modules/binfmt/default.nix b/modules/binfmt/default.nix index 94480de..3010e1f 100644 --- a/modules/binfmt/default.nix +++ b/modules/binfmt/default.nix @@ -6,6 +6,6 @@ }: { boot.binfmt.emulatedSystems = ["aarch64-linux" "i686-linux" "riscv64-linux"]; nix.extraOptions = '' - extra-platforms = aarch64-linux arm-linux i686-linux + extra-platforms = aarch64-linux arm-linux i686-linux riscv64-linux ''; } diff --git a/modules/remote-xfce/default.nix b/modules/remote-xfce/default.nix new file mode 100644 index 0000000..af0b332 --- /dev/null +++ b/modules/remote-xfce/default.nix @@ -0,0 +1,28 @@ +{ + pkgs, + config, + ... +}: { + # nixpkgs.config.pulseaudio = true; + # services.xrdp = { + # enable = true; + # defaultWindowManager = "xfce-session"; + # }; + # services.xserver = { + # enable = true; + # desktopManager = { + # xterm.enable = false; + # xfce.enable = true; + # }; + # displayManager.defaultSession = "xfce"; + # }; + environment.systemPackages = with pkgs; [sunshine superTuxKart]; + + boot.kernelModules = ["uinput"]; + + users.groups.input.members = ["ccr"]; + + services.udev.extraRules = '' + KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | + ''; +}