diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c22f805..094ad3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,9 @@ stages: - build - test +variables: + GIT_SUBMODULE_STRATEGY: recursive + cache: &global_cache key: files: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6da8c7b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,14 @@ +[submodule "submodules/nixpkgs"] + path = submodules/nixpkgs + url = https://github.com/karaolidis/nixpkgs + branch = integration + +[submodule "submodules/home-manager"] + path = submodules/home-manager + url = https://github.com/karaolidis/home-manager.git + branch = integration + +[submodule "submodules/impermanence"] + path = submodules/impermanence + url = https://github.com/karaolidis/impermanence + branch = integration diff --git a/flake.lock b/flake.lock index 3214cfd..63a2512 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1719864345, - "narHash": "sha256-e4Pw+30vFAxuvkSTaTypd9zYemB/QlWcH186dsGT+Ms=", + "lastModified": 1720056646, + "narHash": "sha256-BymcV4HWtx2VFuabDCM4/nEJcfivCx0S02wUCz11mAY=", "owner": "nix-community", "repo": "disko", - "rev": "544a80a69d6e2da04e4df7ec8210a858de8c7533", + "rev": "64679cd7f318c9b6595902b47d4585b1d51d5f9e", "type": "github" }, "original": { @@ -47,15 +47,16 @@ ] }, "locked": { - "lastModified": 1719992360, - "narHash": "sha256-SRq0ZRkqagqpMGVf4z9q9CIWRbPYjO7FTqSJyWh7nes=", - "owner": "nix-community", + "lastModified": 1720367448, + "narHash": "sha256-GttUD2lobMaLCYC3f39SBFSH2Ji7v1Yf+JOFYKYuQ7Y=", + "owner": "karaolidis", "repo": "home-manager", - "rev": "36e2f9da91ce8b63a549a47688ae60d47c50de4b", + "rev": "f837c613224c4709412e563d43f3ec3b50acedda", "type": "github" }, "original": { - "owner": "nix-community", + "owner": "karaolidis", + "ref": "integration", "repo": "home-manager", "type": "github" } @@ -71,18 +72,18 @@ }, "original": { "owner": "karaolidis", - "ref": "home-manager-ordering", + "ref": "integration", "repo": "impermanence", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1719848872, - "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { @@ -94,16 +95,16 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1719663039, - "narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=", + "lastModified": 1720282526, + "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119", + "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.11", + "ref": "release-24.05", "repo": "nixpkgs", "type": "github" } @@ -126,11 +127,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1719873517, - "narHash": "sha256-D1dxZmXf6M2h5lNE1m6orojuUawVPjogbGRsqSBX+1g=", + "lastModified": 1720321395, + "narHash": "sha256-kcI8q9Nh8/CSj0ygfWq1DLckHl8IHhFarL8ie6g7OEk=", "owner": "Mic92", "repo": "sops-nix", - "rev": "a11224af8d824935f363928074b4717ca2e280db", + "rev": "c184aca4db5d71c3db0c8cbfcaaec337a5d065ea", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 039079c..12c5a5b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,26 +1,45 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs = { + type = "github"; + owner = "NixOS"; + # owner = "karaolidis"; + repo = "nixpkgs"; + ref = "nixos-unstable"; + # ref = "integration"; + # url = "git+file:./submodules/nixpkgs"; + }; + + home-manager = { + type = "github"; + # owner = "nix-community" + owner = "karaolidis"; + repo = "home-manager"; + ref = "integration"; + # url = "git+file:./submodules/home-manager"; + + inputs.nixpkgs.follows = "nixpkgs"; + }; + + impermanence = { + type = "github"; + # owner = "nix-community" + owner = "karaolidis"; + repo = "impermanence"; + ref = "integration"; + # url = "git+file:./submodules/impermanence"; + }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; - impermanence = { - url = "github:karaolidis/impermanence/?ref=home-manager-ordering"; - }; - sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - ags = { url = "github:Aylur/ags"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/submodules/.gitkeep b/submodules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/users/common/options/home-manager/theme/default.nix b/users/common/options/home-manager/theme/default.nix index bcb06db..af2e31a 100644 --- a/users/common/options/home-manager/theme/default.nix +++ b/users/common/options/home-manager/theme/default.nix @@ -309,7 +309,7 @@ in packages = mkOption { type = listOf package; default = with pkgs; [ - gnome.adwaita-icon-theme + adwaita-icon-theme nixos-icons ]; description = "The icon theme packages."; @@ -325,7 +325,7 @@ in packages = mkOption { type = listOf package; - default = with pkgs; [ gnome.adwaita-icon-theme ]; + default = with pkgs; [ adwaita-icon-theme ]; description = "The cursor theme packages."; }; diff --git a/users/configs/cliphist/default.nix b/users/configs/cliphist/default.nix index 8241443..511e780 100644 --- a/users/configs/cliphist/default.nix +++ b/users/configs/cliphist/default.nix @@ -10,44 +10,18 @@ in persistence."/cache${user.home}".directories = [ "${hmConfig.xdg.relativeCacheHome}/cliphist" ]; }; - systemd.user.services = { - cliphist-text = { - Unit = { - Description = "Clipboard manager (text)"; - BindsTo = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; + services.cliphist.enable = true; - Service.ExecStart = lib.meta.getExe (pkgs.writeShellApplication { - name = "init-cliphist-text"; - runtimeInputs = with pkgs; [ wl-clipboard cliphist ]; - text = "exec wl-paste --type text --watch cliphist store"; - }); - - Install.WantedBy = [ "graphical-session.target" ]; - }; - - cliphist-image = { - Unit = { - Description = "Clipboard manager (images)"; - BindsTo = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - - Service.ExecStart = lib.meta.getExe (pkgs.writeShellApplication { - name = "init-cliphist-image"; - runtimeInputs = with pkgs; [ wl-clipboard cliphist ]; - text = "exec wl-paste --type image --watch cliphist store"; - }); - - Install.WantedBy = [ "graphical-session.target" ]; - }; - }; - - wayland.windowManager.hyprland.settings.bind = [ - "$mod, v, exec, cliphist list | ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -dmenu -display-columns 2 | cliphist decode | wl-copy" - "$mod_CTRL, v, exec, cliphist list | ${lib.meta.getExe pkgs.rofi-wayland} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -dmenu -display-columns 2 | cliphist delete" - "$mod_CTRL_SHIFT, v, exec, cliphist wipe" - ]; + wayland.windowManager.hyprland.settings.bind = + let + cliphist = lib.meta.getExe pkgs.cliphist; + rofi = lib.meta.getExe pkgs.rofi-wayland; + wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy"; + in + [ + "$mod, v, exec, ${cliphist} list | ${rofi} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -dmenu -display-columns 2 | ${cliphist} decode | ${wl-copy}" + "$mod_CTRL, v, exec, ${cliphist} list | ${rofi} -cache-dir ${hmConfig.xdg.cacheHome}/rofi -dmenu -display-columns 2 | ${cliphist} delete" + "$mod_CTRL_SHIFT, v, exec, ${cliphist} wipe" + ]; }; } diff --git a/users/configs/syncthing/default.nix b/users/configs/syncthing/default.nix new file mode 100644 index 0000000..795d053 --- /dev/null +++ b/users/configs/syncthing/default.nix @@ -0,0 +1,15 @@ +{ user ? throw "user argument is required" }: { ... }: + +{ + networking.firewall = { + allowedTCPPorts = [ 22000 ]; + allowedUDPPorts = [ 21027 22000 ]; + }; + + home-manager.users.${user.name} = { + services.syncthing = { + enable = true; + extraOptions = [ "-no-default-folder" ]; + }; + }; +} diff --git a/users/nick/default.nix b/users/nick/default.nix index 638a35c..46e179a 100644 --- a/users/nick/default.nix +++ b/users/nick/default.nix @@ -18,6 +18,7 @@ in (import ../configs/bluetooth { inherit user; }) (import ../configs/blueman { inherit user; }) (import ../configs/cbatticon { inherit user; }) + (import ../configs/syncthing { inherit user; }) (import ../configs/brightnessctl { inherit user; }) (import ../configs/pavucontrol { inherit user; }) (import ../configs/pipewire { inherit user; })