From 991b93c0ae3fe9d05e6c5045386e778256008c32 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 22 Apr 2023 21:00:55 +0200 Subject: [PATCH 01/15] migrate woodpecker --- .editorconfig | 2 +- nixos/hosts/olympus/default.nix | 1 + .../olympus/woodpecker/configuration.nix | 58 ++++++++----------- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/.editorconfig b/.editorconfig index c1e2c64..5d47c21 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ root = true [*] indent_style = space -indent_size = 4 +indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true diff --git a/nixos/hosts/olympus/default.nix b/nixos/hosts/olympus/default.nix index 0d9992e..2a78cbe 100644 --- a/nixos/hosts/olympus/default.nix +++ b/nixos/hosts/olympus/default.nix @@ -144,6 +144,7 @@ }; "woodpecker" = { ip = "10.42.42.33"; + ip6 = "2001:41f0:9639:1:1c24:daff:fedb:4a1a"; mac = "1E:24:DA:DB:4A:1A"; }; "nuc" = { diff --git a/nixos/hosts/olympus/woodpecker/configuration.nix b/nixos/hosts/olympus/woodpecker/configuration.nix index d7ca1fa..4dc9599 100644 --- a/nixos/hosts/olympus/woodpecker/configuration.nix +++ b/nixos/hosts/olympus/woodpecker/configuration.nix @@ -18,53 +18,43 @@ in { # Additional packages environment.systemPackages = with pkgs; [ ]; - networking.firewall.allowedTCPPorts = [ ]; + networking.firewall.allowedTCPPorts = [ 8000 9000 ]; vault-secrets.secrets.woodpecker = { - services = [ "podman-woodpecker-server" "podman-woodpecker-agent" ]; + services = [ "woodpecker-server" "woodpecker-agent-docker" ]; quoteEnvironmentValues = false; # Needed for docker }; virtualisation.podman = { enable = true; dockerSocket.enable = true; + dockerCompat = true; }; - systemd.services.create-woodpecker-pod = with config.virtualisation.oci-containers; { - serviceConfig.Type = "oneshot"; - wantedBy = [ "${backend}-woodpecker-server.service" "${backend}-woodpecker-agent.service"]; - script = '' - ${pkgs.podman}/bin/podman pod exists woodpecker || \ - ${pkgs.podman}/bin/podman pod create -n woodpecker -p 8000:8000 - ''; + services.woodpecker-server = { + enable = true; + environment = { + WOODPECKER_OPEN = "true"; + WOODPECKER_HOST = "https://ci.0x76.dev"; + WOODPECKER_GITEA = "true"; + WOODPECKER_GITEA_URL = "https://git.0x76.dev"; + WOODPECKER_ADMIN = "v"; + WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true"; + WOODPECKER_SERVER_ADDR = "0.0.0.0:8000"; + }; + environmentFile = "${vs.woodpecker}/environment"; }; - virtualisation.oci-containers = { - backend = "podman"; - containers = { - woodpecker-server = { - image = "woodpeckerci/woodpecker-server:latest"; - volumes = [ "woodpecker-server-data:/var/lib/woodpecker/" ]; - environmentFiles = [ "${vs.woodpecker}/environment" ]; - extraOptions = [ "--pod=woodpecker" ]; - environment = { - WOODPECKER_OPEN = "true"; - WOODPECKER_HOST = "https://ci.0x76.dev"; - WOODPECKER_GITEA = "true"; - WOODPECKER_GITEA_URL = "https://git.0x76.dev"; - WOODPECKER_ADMIN = "v"; - WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true"; - }; - }; - woodpecker-agent = { - image = "woodpeckerci/woodpecker-agent:latest"; - dependsOn = [ "woodpecker-server" ]; - extraOptions = [ "--pod=woodpecker" ]; - cmd = [ "agent" ]; - volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ]; - environmentFiles = [ "${vs.woodpecker}/environment" ]; - environment = { WOODPECKER_SERVER = "localhost:9000"; }; + services.woodpecker-agents.agents = { + docker = { + enable = true; + environment = { + DOCKER_HOST = "unix:///run/podman/podman.sock"; + WOODPECKER_BACKEND = "docker"; + WOODPECKER_SERVER = "localhost:9000"; }; + environmentFile = [ "${vs.woodpecker}/environment" ]; + extraGroups = [ "podman" ]; }; }; } From 45afddf9f3839f0ed6bf01e4b55e0aba1f40c75b Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 22 Apr 2023 21:08:38 +0200 Subject: [PATCH 02/15] ip6 still too buggy --- nixos/hosts/olympus/default.nix | 1 - nixos/hosts/olympus/woodpecker/configuration.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/hosts/olympus/default.nix b/nixos/hosts/olympus/default.nix index 2a78cbe..0d9992e 100644 --- a/nixos/hosts/olympus/default.nix +++ b/nixos/hosts/olympus/default.nix @@ -144,7 +144,6 @@ }; "woodpecker" = { ip = "10.42.42.33"; - ip6 = "2001:41f0:9639:1:1c24:daff:fedb:4a1a"; mac = "1E:24:DA:DB:4A:1A"; }; "nuc" = { diff --git a/nixos/hosts/olympus/woodpecker/configuration.nix b/nixos/hosts/olympus/woodpecker/configuration.nix index 4dc9599..a0590fb 100644 --- a/nixos/hosts/olympus/woodpecker/configuration.nix +++ b/nixos/hosts/olympus/woodpecker/configuration.nix @@ -40,7 +40,7 @@ in { WOODPECKER_GITEA_URL = "https://git.0x76.dev"; WOODPECKER_ADMIN = "v"; WOODPECKER_AUTHENTICATE_PUBLIC_REPOS = "true"; - WOODPECKER_SERVER_ADDR = "0.0.0.0:8000"; + WOODPECKER_SERVER_ADDR = "10.42.42.33:8000"; }; environmentFile = "${vs.woodpecker}/environment"; }; From 47541b271559caf4b9fe0a47b2cbd51a437fb653 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 22 Apr 2023 21:21:52 +0200 Subject: [PATCH 03/15] try new plugin-git --- .woodpecker.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index cdd77d8..95294f7 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,3 +1,10 @@ +clone: + git: + image: woodpeckerci/plugin-git:next + settings: + depth: 50 + lfs: false + pipeline: check: image: nixos/nix:2.15.0 From f33e6f755ce8fb5c44243fc497aa78df7ce54ed7 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 22 Apr 2023 22:09:11 +0200 Subject: [PATCH 04/15] debug ci --- .woodpecker.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 95294f7..ee9c50d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,9 +1,6 @@ clone: git: - image: woodpeckerci/plugin-git:next - settings: - depth: 50 - lfs: false + image: rancher/pause pipeline: check: From 5c88741527d4d8145598c146dff810a5e4ec6092 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 24 Apr 2023 06:00:26 +0000 Subject: [PATCH 05/15] chore(deps): update renovate/renovate docker tag to v35.58.0 --- flux/olympus/apps/services/renovate/cronjob.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flux/olympus/apps/services/renovate/cronjob.yaml b/flux/olympus/apps/services/renovate/cronjob.yaml index 5ed7830..f78fd2d 100644 --- a/flux/olympus/apps/services/renovate/cronjob.yaml +++ b/flux/olympus/apps/services/renovate/cronjob.yaml @@ -19,7 +19,7 @@ spec: emptyDir: {} containers: - name: renovate - image: renovate/renovate:35.57.0 + image: renovate/renovate:35.58.0 volumeMounts: - name: config-volume mountPath: /opt/renovate/ From 1de0699aa36ef9245693985e3f6f6b8572f0038f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 22 Apr 2023 22:01:36 +0000 Subject: [PATCH 06/15] chore(deps): lock file maintenance --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index fe330f3..374e13a 100644 --- a/flake.lock +++ b/flake.lock @@ -484,11 +484,11 @@ ] }, "locked": { - "lastModified": 1682072616, - "narHash": "sha256-sR5RL3LACGuq5oePcAoJ/e1S3vitKQQSNACMYmqIE1E=", + "lastModified": 1682176386, + "narHash": "sha256-xwYjQ8PjfdHlggi8Dq0PXWby/1oXegSUuNuBvoTcnpA=", "owner": "nix-community", "repo": "home-manager", - "rev": "47d6c3f65234230d37f1cf7d3d6b5575ec80fe0c", + "rev": "6169690ae38175295605d521bd778d999fbd85cd", "type": "github" }, "original": { @@ -799,11 +799,11 @@ }, "nixpkgs_22-11": { "locked": { - "lastModified": 1681932375, - "narHash": "sha256-tSXbYmpnKSSWpzOrs27ie8X3I0yqKA6AuCzCYNtwbCU=", + "lastModified": 1682134069, + "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3d302c67ab8647327dba84fbdb443cdbf0e82744", + "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", "type": "github" }, "original": { @@ -946,11 +946,11 @@ }, "nur": { "locked": { - "lastModified": 1682170448, - "narHash": "sha256-vYIeXWCl9hOTUKUA6RhS+XqN31VR+GJbcNxBYpjIQU4=", + "lastModified": 1682197907, + "narHash": "sha256-lmN70ThAOkTTHu2uul1GE6oU6En+b1yFpLY8obzJopU=", "owner": "nix-community", "repo": "NUR", - "rev": "fe2bdf88ea839ca934412d8c9a7fad26893e481e", + "rev": "56f2104ae98978ae8d351a43f6f6226364d844aa", "type": "github" }, "original": { From 15631ffcfe5c505e0e2bac6ad4012aedeca9b07e Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 24 Apr 2023 09:35:28 +0200 Subject: [PATCH 07/15] updates --- .woodpecker.yml | 4 -- flake.lock | 30 ++++++------ nixos/hosts/hades/minio/configuration.nix | 2 +- nixos/hosts/olympus/minio/configuration.nix | 2 +- nixos/hosts/thalassa/aoife/configuration.nix | 3 ++ nixos/hosts/thalassa/aoife/home/default.nix | 9 +++- nixos/pkgs/default.nix | 3 -- nixos/pkgs/minio-old/default.nix | 51 -------------------- 8 files changed, 28 insertions(+), 76 deletions(-) delete mode 100644 nixos/pkgs/minio-old/default.nix diff --git a/.woodpecker.yml b/.woodpecker.yml index ee9c50d..cdd77d8 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,7 +1,3 @@ -clone: - git: - image: rancher/pause - pipeline: check: image: nixos/nix:2.15.0 diff --git a/flake.lock b/flake.lock index 374e13a..0d7c123 100644 --- a/flake.lock +++ b/flake.lock @@ -88,11 +88,11 @@ "stable": "stable" }, "locked": { - "lastModified": 1675730932, - "narHash": "sha256-XcmirehPIcZGS7PzkS3WvAYQ9GBlBvCxYToIOIV2PVE=", + "lastModified": 1682202576, + "narHash": "sha256-vcTEEEHKx4PTfY80bUmZMwXRy0cTDJCkULHhqe1HJS8=", "owner": "zhaofengli", "repo": "colmena", - "rev": "e034c15825c439131e4489de5a82cf8e5398fa61", + "rev": "089431737e283ed3e402a7dff578cb442444c431", "type": "github" }, "original": { @@ -484,11 +484,11 @@ ] }, "locked": { - "lastModified": 1682176386, - "narHash": "sha256-xwYjQ8PjfdHlggi8Dq0PXWby/1oXegSUuNuBvoTcnpA=", + "lastModified": 1682273416, + "narHash": "sha256-YvRc5TOyf92Fcvt6cYfsqxfjqalAUME3Klv4IbdhkBE=", "owner": "nix-community", "repo": "home-manager", - "rev": "6169690ae38175295605d521bd778d999fbd85cd", + "rev": "a5a294a622a7d3a837aaa145334e4d813c1bc5b1", "type": "github" }, "original": { @@ -799,11 +799,11 @@ }, "nixpkgs_22-11": { "locked": { - "lastModified": 1682134069, - "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", + "lastModified": 1682173319, + "narHash": "sha256-tPhOpJJ+wrWIusvGgIB2+x6ILfDkEgQMX0BTtM5vd/4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", + "rev": "ee7ec1c71adc47d2e3c2d5eb0d6b8fbbd42a8d1c", "type": "github" }, "original": { @@ -831,11 +831,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1681920287, - "narHash": "sha256-+/d6XQQfhhXVfqfLROJoqj3TuG38CAeoT6jO1g9r1k0=", + "lastModified": 1682181988, + "narHash": "sha256-CYWhlNi16cjGzMby9h57gpYE59quBcsHPXiFgX4Sw5k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "645bc49f34fa8eff95479f0345ff57e55b53437e", + "rev": "6c43a3495a11e261e5f41e5d7eda2d71dae1b2fe", "type": "github" }, "original": { @@ -946,11 +946,11 @@ }, "nur": { "locked": { - "lastModified": 1682197907, - "narHash": "sha256-lmN70ThAOkTTHu2uul1GE6oU6En+b1yFpLY8obzJopU=", + "lastModified": 1682319022, + "narHash": "sha256-v5pkzaE8ygTEyK4Sqtwn+hgMxXfo+kySRBQenPD+P2o=", "owner": "nix-community", "repo": "NUR", - "rev": "56f2104ae98978ae8d351a43f6f6226364d844aa", + "rev": "08e8360bdeda32317aa4060c8c5b2c55136ae82b", "type": "github" }, "original": { diff --git a/nixos/hosts/hades/minio/configuration.nix b/nixos/hosts/hades/minio/configuration.nix index 00039c3..5d2f755 100644 --- a/nixos/hosts/hades/minio/configuration.nix +++ b/nixos/hosts/hades/minio/configuration.nix @@ -13,6 +13,6 @@ in { services.minio = { enable = true; rootCredentialsFile = "${vs.minio}/environment"; - package = pkgs.v.minio-old; + package = pkgs.minio_legacy_fs; }; } diff --git a/nixos/hosts/olympus/minio/configuration.nix b/nixos/hosts/olympus/minio/configuration.nix index 1ce65f3..95187b2 100644 --- a/nixos/hosts/olympus/minio/configuration.nix +++ b/nixos/hosts/olympus/minio/configuration.nix @@ -27,7 +27,7 @@ in { services.minio = { enable = true; - package = pkgs.v.minio-old; + package = pkgs.minio_legacy_fs; rootCredentialsFile = "${vs.minio}/environment"; listenAddress = ":${toString listenPort}"; consoleAddress = ":${toString consolePort}"; diff --git a/nixos/hosts/thalassa/aoife/configuration.nix b/nixos/hosts/thalassa/aoife/configuration.nix index 655438f..662202b 100644 --- a/nixos/hosts/thalassa/aoife/configuration.nix +++ b/nixos/hosts/thalassa/aoife/configuration.nix @@ -120,4 +120,7 @@ ]; nix.settings.extra-sandbox-paths = [ (toString config.programs.ccache.cacheDir) ]; + + # Enable Ozone rendering for Chromium and Electron apps. + environment.sessionVariables.NIXOS_OZONE_WL = "1"; } diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix index 855fe91..109aaac 100644 --- a/nixos/hosts/thalassa/aoife/home/default.nix +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -14,7 +14,7 @@ in { imports = [ ./dconf.nix ./theme.nix - ./neovim.nix + ./neovim.nix ]; home.packages = with pkgs; [ @@ -189,5 +189,12 @@ in { videos = "${home}/cloud/Videos"; }; + # xdg.configFile."electron-flags.conf".text = '' + # --enable-features=UseOzonePlatform + # --ozone-platform=wayland + # --enable-features=WaylandWindowDecorations + # --ozone-platform-hint=auto + # ''; + services.syncthing.enable = true; } diff --git a/nixos/pkgs/default.nix b/nixos/pkgs/default.nix index 3e7f642..3a5edee 100644 --- a/nixos/pkgs/default.nix +++ b/nixos/pkgs/default.nix @@ -1,9 +1,6 @@ # nix-build -E 'with import {}; callPackage ./default.nix {}' final: prev: { v = { - # nixos 22.11 version of minio, need to upgrade backend from fs to xl - minio-old = prev.callPackage ./minio-old { }; - glitch-soc = prev.callPackage ./glitch-soc { }; deemix-gui = prev.callPackage ./deemix-gui { }; diff --git a/nixos/pkgs/minio-old/default.nix b/nixos/pkgs/minio-old/default.nix deleted file mode 100644 index 13c29ac..0000000 --- a/nixos/pkgs/minio-old/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ lib, buildGoModule, fetchFromGitHub, nixosTests }: - -let - # The web client verifies, that the server version is a valid datetime string: - # https://github.com/minio/minio/blob/3a0e7347cad25c60b2e51ff3194588b34d9e424c/browser/app/js/web.js#L51-L53 - # - # Example: - # versionToTimestamp "2021-04-22T15-44-28Z" - # => "2021-04-22T15:44:28Z" - versionToTimestamp = version: - let - splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1; - in - builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ]; -in -buildGoModule rec { - pname = "minio"; - version = "2022-10-24T18-35-07Z"; - - src = fetchFromGitHub { - owner = "minio"; - repo = "minio"; - rev = "RELEASE.${version}"; - sha256 = "sha256-sABNzhyfBNU5pWyE/VWHUzuSyKsx0glj01ectJPakV8="; - }; - - vendorSha256 = "sha256-wB3UiuptT6D0CIUlHC1d5k0rjIxNeh5yAWOmYpyLGmA="; - - doCheck = false; - - subPackages = [ "." ]; - - CGO_ENABLED = 0; - - tags = [ "kqueue" ]; - - ldflags = let t = "github.com/minio/minio/cmd"; in [ - "-s" "-w" "-X ${t}.Version=${versionToTimestamp version}" "-X ${t}.ReleaseTag=RELEASE.${version}" "-X ${t}.CommitID=${src.rev}" - ]; - - passthru.tests.minio = nixosTests.minio; - - meta = with lib; { - homepage = "https://www.minio.io/"; - description = "An S3-compatible object storage server"; - changelog = "https://github.com/minio/minio/releases/tag/RELEASE.${version}"; - maintainers = with maintainers; [ eelco bachp ]; - platforms = platforms.unix; - license = licenses.agpl3Plus; - }; -} From 8d092693af5f5002ec1cdacea14c98597a805433 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 24 Apr 2023 09:42:17 +0200 Subject: [PATCH 08/15] nginx: streamline brotli --- nixos/hosts/olympus/nginx/configuration.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/nixos/hosts/olympus/nginx/configuration.nix b/nixos/hosts/olympus/nginx/configuration.nix index 8474edb..564061b 100644 --- a/nixos/hosts/olympus/nginx/configuration.nix +++ b/nixos/hosts/olympus/nginx/configuration.nix @@ -39,11 +39,10 @@ in { recommendedProxySettings = true; recommendedTlsSettings = true; recommendedOptimisation = true; + recommendedBrotliSettings = true; clientMaxBodySize = "500m"; - package = pkgs.nginxMainline.override { - modules = with pkgs.nginxModules; [ brotli ]; - }; + package = pkgs.nginxMainline; # 0x76.dev virtualHosts."ha.0x76.dev" = proxy "http://home-assistant.olympus:8123/"; @@ -148,17 +147,6 @@ in { virtualHosts."blog.xirion.net" = k8s_proxy; }; - services.nginx.commonHttpConfig = '' - brotli on; - brotli_comp_level 6; - brotli_static on; - brotli_types application/atom+xml application/javascript application/json application/rss+xml - application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype - application/x-font-ttf application/x-javascript application/xhtml+xml application/xml - font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon - image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml; - ''; - security.acme.defaults.email = "victorheld12@gmail.com"; security.acme.acceptTerms = true; security.acme.preliminarySelfsigned = true; From 3dd06c0bfb0bdc242379983ccf6635c80d681f22 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 24 Apr 2023 10:00:56 +0200 Subject: [PATCH 09/15] things --- flake.lock | 7 +++---- flake.nix | 2 +- nixos/hosts/olympus/bastion/configuration.nix | 13 +++++++++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 0d7c123..2bd8a5a 100644 --- a/flake.lock +++ b/flake.lock @@ -831,16 +831,15 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1682181988, - "narHash": "sha256-CYWhlNi16cjGzMby9h57gpYE59quBcsHPXiFgX4Sw5k=", + "lastModified": 1682318825, + "narHash": "sha256-rTFe23xSneBU2AqiwTGnXyQBfIDyJzxRKdLYti4BgB8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6c43a3495a11e261e5f41e5d7eda2d71dae1b2fe", + "rev": "6577af679354e6df48fac646b46178455412abc1", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 99fd58c..6226498 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ # * https://github.com/Infinidoge/nix-minecraft inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs"; nixpkgs_22-11.url = "github:nixos/nixpkgs/nixos-22.11"; nur.url = "github:nix-community/NUR"; diff --git a/nixos/hosts/olympus/bastion/configuration.nix b/nixos/hosts/olympus/bastion/configuration.nix index a66794f..0c340d7 100644 --- a/nixos/hosts/olympus/bastion/configuration.nix +++ b/nixos/hosts/olympus/bastion/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, ... }: +{ pkgs, lib, ... }: let fix-vscode = pkgs.writeScriptBin "fix-vscode" '' #!${pkgs.stdenv.shell} @@ -23,6 +23,15 @@ in { ./hardware-configuration.nix ]; + # This _should_ fix vscode errors as well + programs.nix-ld.enable = true; + # environment.variables = { + # NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ + # pkgs.stdenv.cc.cc + # ]; + # # NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; + # }; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2; @@ -36,7 +45,7 @@ in { # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? - virtualisation.podman.enable = true; + virtualisation.podman.enable = true; # Additional packages environment.systemPackages = with pkgs; [ From 1d42925a4344d473c0835d3730c68677cb1f907a Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 25 Apr 2023 09:01:06 +0200 Subject: [PATCH 10/15] started refactoring desktop setup --- nixos/common/desktop/README.md | 1 + nixos/common/desktop/default.nix | 85 ++++++++++++++++ .../eevee => common/desktop}/desktop-env.nix | 5 +- nixos/hosts/thalassa/aoife/configuration.nix | 99 +------------------ nixos/hosts/thalassa/aoife/desktop-env.nix | 53 ---------- nixos/hosts/thalassa/aoife/hardware.nix | 10 ++ nixos/hosts/thalassa/aoife/home/default.nix | 9 +- nixos/hosts/thalassa/eevee/configuration.nix | 86 +--------------- nixos/hosts/thalassa/eevee/hardware.nix | 7 +- 9 files changed, 112 insertions(+), 243 deletions(-) create mode 100644 nixos/common/desktop/README.md create mode 100644 nixos/common/desktop/default.nix rename nixos/{hosts/thalassa/eevee => common/desktop}/desktop-env.nix (92%) delete mode 100644 nixos/hosts/thalassa/aoife/desktop-env.nix diff --git a/nixos/common/desktop/README.md b/nixos/common/desktop/README.md new file mode 100644 index 0000000..48683a6 --- /dev/null +++ b/nixos/common/desktop/README.md @@ -0,0 +1 @@ +# Common NixOS Config shared between desktop and laptop diff --git a/nixos/common/desktop/default.nix b/nixos/common/desktop/default.nix new file mode 100644 index 0000000..41e7b25 --- /dev/null +++ b/nixos/common/desktop/default.nix @@ -0,0 +1,85 @@ +{ pkgs, config, lib, ... }: { + imports = [ + ./desktop-env.nix + ]; + # Bootloader. + boot = { + kernelPackages = pkgs.linuxPackages_latest; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot/efi"; + }; + kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; + initrd = { + systemd.enable = true; + verbose = false; + }; + }; + + # Set your time zone. + time.timeZone = "Europe/Amsterdam"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "nl_NL.UTF-8"; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Global Packages + environment.systemPackages = with pkgs; [ wireguard-tools ]; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + virtualisation = { + podman.enable = true; + libvirtd = { + enable = true; + qemu.package = pkgs.qemu_kvm; + }; + }; + + fonts.fonts = with pkgs; [ + material-design-icons + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + dejavu_fonts + (nerdfonts.override { + fonts = + [ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ]; + }) + ]; + + programs.steam = { + enable = true; + # Open ports in the firewall for Steam Remote Play + remotePlay.openFirewall = true; + }; +} diff --git a/nixos/hosts/thalassa/eevee/desktop-env.nix b/nixos/common/desktop/desktop-env.nix similarity index 92% rename from nixos/hosts/thalassa/eevee/desktop-env.nix rename to nixos/common/desktop/desktop-env.nix index 515325a..4062535 100644 --- a/nixos/hosts/thalassa/eevee/desktop-env.nix +++ b/nixos/common/desktop/desktop-env.nix @@ -1,7 +1,6 @@ -{ pkgs, ... }: { - # Enable the X11 windowing system. +{ pkgs, ...}: { + # TODO: Create Module services.xserver.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.excludePackages = [ pkgs.xterm ]; # Configure keymap in X11 diff --git a/nixos/hosts/thalassa/aoife/configuration.nix b/nixos/hosts/thalassa/aoife/configuration.nix index 662202b..1dd5b4d 100644 --- a/nixos/hosts/thalassa/aoife/configuration.nix +++ b/nixos/hosts/thalassa/aoife/configuration.nix @@ -2,57 +2,21 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, inputs, ... }: { +{ pkgs, inputs, ... }: { imports = [ + ../../../common/desktop ./hardware-configuration.nix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z ./hardware.nix ./networking.nix - ./desktop-env.nix ]; # Bootloader. boot = { - kernelPackages = pkgs.linuxPackages_latest; - # kernelPackages = pkgs.linuxKernel.packages.linux_zen; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - efi.efiSysMountPoint = "/boot/efi"; - }; - kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; - initrd = { - kernelModules = [ "amdgpu" ]; - systemd.enable = true; - verbose = false; - }; + initrd.kernelModules = [ "amdgpu" ]; resumeDevice = "/dev/nvme0n1p2"; }; - fileSystems."/".options = [ "compress=zstd" ]; - - # Set your time zone. - time.timeZone = "Europe/Amsterdam"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_GB.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "nl_NL.UTF-8"; - LC_IDENTIFICATION = "nl_NL.UTF-8"; - LC_MEASUREMENT = "nl_NL.UTF-8"; - LC_MONETARY = "nl_NL.UTF-8"; - LC_NAME = "nl_NL.UTF-8"; - LC_NUMERIC = "nl_NL.UTF-8"; - LC_PAPER = "nl_NL.UTF-8"; - LC_TELEPHONE = "nl_NL.UTF-8"; - LC_TIME = "nl_NL.UTF-8"; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - environment.systemPackages = with pkgs; [ wireguard-tools ]; - home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -60,48 +24,8 @@ extraSpecialArgs = { inherit inputs; }; }; - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - - virtualisation = { - podman.enable = true; - libvirtd = { - enable = true; - qemu.package = pkgs.qemu_kvm; - }; - }; - - fonts.fonts = with pkgs; [ - material-design-icons - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - dejavu_fonts - (nerdfonts.override { - fonts = - [ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ]; - }) - ]; - - programs.steam = { - enable = true; - # Open ports in the firewall for Steam Remote Play - remotePlay.openFirewall = true; - }; + # Enable Ozone rendering for Chromium and Electron apps. + environment.sessionVariables.NIXOS_OZONE_WL = "1"; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions @@ -110,17 +34,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; # Did you read the comment? - - # Enable ccache - # WARNING: Adding packages here makes them always be built from source, so only do so for once that are usually build like that - # This should be fixed when nix switches to content-addresabble paths - programs.ccache.enable = true; - programs.ccache.packageNames = [ - "mongodb" - ]; - nix.settings.extra-sandbox-paths = - [ (toString config.programs.ccache.cacheDir) ]; - - # Enable Ozone rendering for Chromium and Electron apps. - environment.sessionVariables.NIXOS_OZONE_WL = "1"; } diff --git a/nixos/hosts/thalassa/aoife/desktop-env.nix b/nixos/hosts/thalassa/aoife/desktop-env.nix deleted file mode 100644 index a016452..0000000 --- a/nixos/hosts/thalassa/aoife/desktop-env.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ pkgs, ... }: { - # Enable the X11 windowing system. - services.xserver.enable = true; - services.xserver.videoDrivers = [ "amdgpu" ]; - services.xserver.excludePackages = [ pkgs.xterm ]; - - # Configure keymap in X11 - services.xserver = { - # TODO: Is this smart? - dpi = 280; - layout = "us"; - xkbVariant = "altgr-intl"; - xkbOptions = "caps:swapescape"; - }; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - environment.gnome.excludePackages = - (with pkgs; [ gnome-photos gnome-tour gnome-connections ]) - ++ (with pkgs.gnome; [ - atomix # puzzle game - epiphany # web browser - geary # email reader - gedit # text editor - gnome-calendar - gnome-clocks - gnome-contacts - gnome-maps - gnome-music - gnome-notes - gnome-terminal - gnome-weather - hitori # sudoku game - iagno # go game - simple-scan # document scanner - tali # poker game - totem # video player - ]); - - # Services required for gnome - programs.dconf.enable = true; - services.dbus.enable = true; - services.udisks2.enable = true; - - # Extra gnome packages - environment.systemPackages = with pkgs; [ - gnome.gnome-tweaks - gnome.gnome-boxes - ]; - -} diff --git a/nixos/hosts/thalassa/aoife/hardware.nix b/nixos/hosts/thalassa/aoife/hardware.nix index c6b1208..5c89168 100644 --- a/nixos/hosts/thalassa/aoife/hardware.nix +++ b/nixos/hosts/thalassa/aoife/hardware.nix @@ -5,6 +5,16 @@ services.hardware.bolt.enable = true; + # FS + fileSystems."/".options = [ "compress=zstd" ]; + + # Video Driver + services.xserver.videoDrivers = [ "amdgpu" ]; + services.xserver = { + dpi = 280; + xkbOptions = "caps:swapescape"; + }; + # Vulkan hardware.opengl.driSupport = true; hardware.opengl.extraPackages = with pkgs; [ diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix index 109aaac..c2421ba 100644 --- a/nixos/hosts/thalassa/aoife/home/default.nix +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -4,6 +4,7 @@ let inherit (pkgs.texlive) scheme-full; dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; }; + my-python-packages = ps: with ps; [ pandas requests numpy ]; in { programs.home-manager.enable = true; @@ -11,11 +12,7 @@ in { home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ - ./dconf.nix - ./theme.nix - ./neovim.nix - ]; + imports = [ ./dconf.nix ./theme.nix ./neovim.nix ]; home.packages = with pkgs; [ btop @@ -32,7 +29,7 @@ in { neofetch nixfmt nixpkgs-review - python3 + (python3.withPackages my-python-packages) plex-media-player rustup solo2-cli diff --git a/nixos/hosts/thalassa/eevee/configuration.nix b/nixos/hosts/thalassa/eevee/configuration.nix index 355b171..cd7294e 100644 --- a/nixos/hosts/thalassa/eevee/configuration.nix +++ b/nixos/hosts/thalassa/eevee/configuration.nix @@ -4,102 +4,18 @@ { config, pkgs, inputs, ... }: { imports = [ + ../../../common/desktop ./hardware-configuration.nix ./hardware.nix - ./desktop-env.nix ./networking.nix ]; - # Bootloader. - boot = { - kernelPackages = pkgs.linuxPackages_latest; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - efi.efiSysMountPoint = "/boot/efi"; - }; - kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; - initrd = { - kernelModules = [ "amdgpu" ]; - systemd.enable = true; - verbose = false; - }; - }; - - fileSystems."/".options = [ "compress=zstd" ]; - - # Set your time zone. - time.timeZone = "Europe/Amsterdam"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_GB.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "nl_NL.UTF-8"; - LC_IDENTIFICATION = "nl_NL.UTF-8"; - LC_MEASUREMENT = "nl_NL.UTF-8"; - LC_MONETARY = "nl_NL.UTF-8"; - LC_NAME = "nl_NL.UTF-8"; - LC_NUMERIC = "nl_NL.UTF-8"; - LC_PAPER = "nl_NL.UTF-8"; - LC_TELEPHONE = "nl_NL.UTF-8"; - LC_TIME = "nl_NL.UTF-8"; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - environment.systemPackages = with pkgs; [ wireguard-tools ]; - home-manager = { useGlobalPkgs = true; useUserPackages = true; users.victor = import ./home; extraSpecialArgs = { inherit inputs; }; }; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - - virtualisation = { - podman.enable = true; - libvirtd = { - enable = true; - qemu.package = pkgs.qemu_kvm; - }; - }; - - fonts.fonts = with pkgs; [ - material-design-icons - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - dejavu_fonts - (nerdfonts.override { - fonts = - [ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ]; - }) - ]; - - programs.steam = { - enable = true; - # Open ports in the firewall for Steam Remote Play - remotePlay.openFirewall = true; - }; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/nixos/hosts/thalassa/eevee/hardware.nix b/nixos/hosts/thalassa/eevee/hardware.nix index d68fcc0..6993a44 100644 --- a/nixos/hosts/thalassa/eevee/hardware.nix +++ b/nixos/hosts/thalassa/eevee/hardware.nix @@ -1,16 +1,19 @@ { pkgs, config, ... }: { hardware.enableAllFirmware = true; - hardware.bluetooth.enable = true; - services.hardware.bolt.enable = true; + services.xserver.videoDrivers = [ "nvidia" ]; hardware.opengl.enable = true; hardware.nvidia.modesetting.enable = true; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; services.udev.packages = with pkgs; [ wooting-udev-rules ]; + + # FS + fileSystems."/".options = [ "compress=zstd" ]; + # SSD Trim services.fstrim.enable = true; } From 423a2ee604467fe94527e9f22e52853765f20e50 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 25 Apr 2023 09:30:41 +0200 Subject: [PATCH 11/15] extract gnome into module --- nixos/common/desktop/default.nix | 13 ++- nixos/common/desktop/desktop-env.nix | 48 ---------- nixos/common/modules/default.nix | 1 + .../home => common/modules/gnome}/dconf.nix | 2 +- nixos/common/modules/gnome/default.nix | 59 ++++++++++++ nixos/hosts/thalassa/aoife/configuration.nix | 1 - nixos/hosts/thalassa/aoife/home/default.nix | 5 +- nixos/hosts/thalassa/aoife/networking.nix | 5 - nixos/hosts/thalassa/eevee/configuration.nix | 1 - nixos/hosts/thalassa/eevee/home/dconf.nix | 91 ------------------- nixos/hosts/thalassa/eevee/home/default.nix | 10 +- nixos/hosts/thalassa/eevee/networking.nix | 5 - 12 files changed, 79 insertions(+), 162 deletions(-) delete mode 100644 nixos/common/desktop/desktop-env.nix rename nixos/{hosts/thalassa/aoife/home => common/modules/gnome}/dconf.nix (97%) create mode 100644 nixos/common/modules/gnome/default.nix delete mode 100644 nixos/hosts/thalassa/aoife/networking.nix delete mode 100644 nixos/hosts/thalassa/eevee/home/dconf.nix delete mode 100644 nixos/hosts/thalassa/eevee/networking.nix diff --git a/nixos/common/desktop/default.nix b/nixos/common/desktop/default.nix index 41e7b25..aac4970 100644 --- a/nixos/common/desktop/default.nix +++ b/nixos/common/desktop/default.nix @@ -1,7 +1,4 @@ -{ pkgs, config, lib, ... }: { - imports = [ - ./desktop-env.nix - ]; +{ pkgs, ... }: { # Bootloader. boot = { kernelPackages = pkgs.linuxPackages_latest; @@ -17,6 +14,9 @@ }; }; + # Enable my config for the gnome desktop environment + services.v.gnome.enable = true; + # Set your time zone. time.timeZone = "Europe/Amsterdam"; @@ -82,4 +82,9 @@ # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; }; + + # Networking + networking.networkmanager.enable = true; + networking.firewall.checkReversePath = false; + networking.firewall.enable = false; } diff --git a/nixos/common/desktop/desktop-env.nix b/nixos/common/desktop/desktop-env.nix deleted file mode 100644 index 4062535..0000000 --- a/nixos/common/desktop/desktop-env.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ pkgs, ...}: { - # TODO: Create Module - services.xserver.enable = true; - services.xserver.excludePackages = [ pkgs.xterm ]; - - # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = "altgr-intl"; - }; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; - environment.gnome.excludePackages = - (with pkgs; [ gnome-photos gnome-tour gnome-connections ]) - ++ (with pkgs.gnome; [ - atomix # puzzle game - epiphany # web browser - geary # email reader - gedit # text editor - gnome-calendar - gnome-clocks - gnome-contacts - gnome-maps - gnome-music - gnome-notes - gnome-terminal - gnome-weather - hitori # sudoku game - iagno # go game - simple-scan # document scanner - tali # poker game - totem # video player - ]); - - # Services required for gnome - programs.dconf.enable = true; - services.dbus.enable = true; - services.udisks2.enable = true; - - # Extra gnome packages - environment.systemPackages = with pkgs; [ - gnome.gnome-tweaks - gnome.gnome-boxes - ]; -} diff --git a/nixos/common/modules/default.nix b/nixos/common/modules/default.nix index 3680ca0..3e78f27 100644 --- a/nixos/common/modules/default.nix +++ b/nixos/common/modules/default.nix @@ -2,6 +2,7 @@ imports = [ ./dns.nix ./flood.nix + ./gnome ./unpackerr.nix ./vault.nix ]; diff --git a/nixos/hosts/thalassa/aoife/home/dconf.nix b/nixos/common/modules/gnome/dconf.nix similarity index 97% rename from nixos/hosts/thalassa/aoife/home/dconf.nix rename to nixos/common/modules/gnome/dconf.nix index 9b1e575..14fa0b9 100644 --- a/nixos/hosts/thalassa/aoife/home/dconf.nix +++ b/nixos/common/modules/gnome/dconf.nix @@ -19,7 +19,7 @@ in { dconf.settings = { "org/gnome/desktop/input-sources" = { sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ]; - xkb-options = [ "terminate:ctrl_alt_bksp" "caps:swapescape" ]; + xkb-options = [ "terminate:ctrl_alt_bksp" ]; }; "org/gnome/desktop/peripherals/touchpad" = { diff --git a/nixos/common/modules/gnome/default.nix b/nixos/common/modules/gnome/default.nix new file mode 100644 index 0000000..4b72f6b --- /dev/null +++ b/nixos/common/modules/gnome/default.nix @@ -0,0 +1,59 @@ +{ config, pkgs, lib, flat_hosts, ... }: +with lib; +let cfg = config.services.v.gnome; + +in { + options.services.v.gnome = { enable = mkEnableOption "v.gnome"; }; + + config = mkIf cfg.enable { + services.xserver.enable = true; + services.xserver.excludePackages = [ pkgs.xterm ]; + + home-manager.sharedModules = [ + ./dconf.nix + ]; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = "altgr-intl"; + }; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + environment.gnome.excludePackages = + (with pkgs; [ gnome-photos gnome-tour gnome-connections ]) + ++ (with pkgs.gnome; [ + atomix # puzzle game + epiphany # web browser + geary # email reader + gedit # text editor + gnome-calendar + gnome-clocks + gnome-contacts + gnome-maps + gnome-music + gnome-notes + gnome-terminal + gnome-weather + hitori # sudoku game + iagno # go game + simple-scan # document scanner + tali # poker game + totem # video player + ]); + + # Services required for gnome + programs.dconf.enable = true; + services.dbus.enable = true; + services.udisks2.enable = true; + + # Extra gnome packages + environment.systemPackages = with pkgs; [ + gnome.gnome-tweaks + gnome.gnome-boxes + ]; + }; +} diff --git a/nixos/hosts/thalassa/aoife/configuration.nix b/nixos/hosts/thalassa/aoife/configuration.nix index 1dd5b4d..29ed1f3 100644 --- a/nixos/hosts/thalassa/aoife/configuration.nix +++ b/nixos/hosts/thalassa/aoife/configuration.nix @@ -8,7 +8,6 @@ ./hardware-configuration.nix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z ./hardware.nix - ./networking.nix ]; # Bootloader. diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix index c2421ba..84adb33 100644 --- a/nixos/hosts/thalassa/aoife/home/default.nix +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -12,7 +12,10 @@ in { home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ ./dconf.nix ./theme.nix ./neovim.nix ]; + imports = [ ./theme.nix ./neovim.nix ]; + + # Custom dconf settings + dconf.settings."org/gnome/desktop/input-sources".xkb-options = [ "caps:swapescape"]; home.packages = with pkgs; [ btop diff --git a/nixos/hosts/thalassa/aoife/networking.nix b/nixos/hosts/thalassa/aoife/networking.nix deleted file mode 100644 index 826668a..0000000 --- a/nixos/hosts/thalassa/aoife/networking.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - networking.networkmanager.enable = true; - networking.firewall.checkReversePath = false; - networking.firewall.enable = false; -} diff --git a/nixos/hosts/thalassa/eevee/configuration.nix b/nixos/hosts/thalassa/eevee/configuration.nix index cd7294e..69d17a9 100644 --- a/nixos/hosts/thalassa/eevee/configuration.nix +++ b/nixos/hosts/thalassa/eevee/configuration.nix @@ -7,7 +7,6 @@ ../../../common/desktop ./hardware-configuration.nix ./hardware.nix - ./networking.nix ]; home-manager = { diff --git a/nixos/hosts/thalassa/eevee/home/dconf.nix b/nixos/hosts/thalassa/eevee/home/dconf.nix deleted file mode 100644 index 32c102d..0000000 --- a/nixos/hosts/thalassa/eevee/home/dconf.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ lib, ... }: - -with lib.hm.gvariant; -let - inherit (builtins) attrNames map; - inherit (lib.attrsets) mapAttrs' nameValuePair; - generate_custom_keybindings = binds: - { - "org/gnome/settings-daemon/plugins/media-keys" = { - custom-keybindings = map (name: - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}/") - (attrNames binds); - }; - } // mapAttrs' (name: - nameValuePair - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}") - binds; -in { - dconf.settings = { - "org/gnome/desktop/input-sources" = { - sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ]; - }; - - "org/gnome/desktop/peripherals/mouse" = { - accel-profile = "flat"; - }; - - "org/gnome/desktop/peripherals/touchpad" = { - tap-to-click = true; - two-finger-scrolling-enabled = true; - }; - - "org/gnome/mutter" = { - attach-modal-dialogs = true; - dynamic-workspaces = false; - edge-tiling = true; - focus-change-on-pointer-rest = true; - workspaces-only-on-primary = true; - }; - - "org/gnome/mutter/keybindings" = { - toggle-tiled-left = [ "bracketleft" ]; - toggle-tiled-right = [ "bracketright" ]; - }; - - "org/gnome/shell/keybindings" = { toggle-overview = [ "d" ]; }; - - "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; }; - - "org/gnome/desktop/wm/preferences" = { - auto-raise = false; - num-workspaces = 6; - focus-mode = "sloppy"; - }; - - "org/gnome/desktop/wm/keybindings" = { - raise-or-lower = [ "s" ]; - switch-applications = [ "Tab" ]; - switch-applications-backward = [ "Tab" ]; - move-to-workspace-1 = [ "exclam" ]; - move-to-workspace-2 = [ "at" ]; - move-to-workspace-3 = [ "numbersign" ]; - move-to-workspace-4 = [ "dollar" ]; - move-to-workspace-5 = [ "percent" ]; - move-to-workspace-6 = [ "asciicircum" ]; - switch-to-workspace-1 = [ "1" ]; - switch-to-workspace-2 = [ "2" ]; - switch-to-workspace-3 = [ "3" ]; - switch-to-workspace-4 = [ "4" ]; - switch-to-workspace-5 = [ "5" ]; - switch-to-workspace-6 = [ "6" ]; - toggle-fullscreen = [ "M" ]; - toggle-maximized = [ "m" ]; - }; - - "org/gnome/tweaks" = { show-extensions-notice = false; }; - - "org/gnome/boxes" = { first-run = false; }; - } // generate_custom_keybindings { - "terminal" = { - binding = "Return"; - command = "kgx"; - name = "Open Terminal"; - }; - "firefox" = { - binding = "f"; - command = "firefox"; - name = "Open Firefox"; - }; - }; -} diff --git a/nixos/hosts/thalassa/eevee/home/default.nix b/nixos/hosts/thalassa/eevee/home/default.nix index 4aaf26f..6bf9335 100644 --- a/nixos/hosts/thalassa/eevee/home/default.nix +++ b/nixos/hosts/thalassa/eevee/home/default.nix @@ -11,11 +11,11 @@ in { home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ - ./dconf.nix - ./theme.nix - ./neovim.nix - ]; + imports = [ ./theme.nix ./neovim.nix ]; + + dconf.settings."org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; home.packages = with pkgs; [ btop diff --git a/nixos/hosts/thalassa/eevee/networking.nix b/nixos/hosts/thalassa/eevee/networking.nix deleted file mode 100644 index 826668a..0000000 --- a/nixos/hosts/thalassa/eevee/networking.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - networking.networkmanager.enable = true; - networking.firewall.checkReversePath = false; - networking.firewall.enable = false; -} From 2dfc594aadff776a00eec74f72e108eefdd4a053 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 25 Apr 2023 09:50:25 +0200 Subject: [PATCH 12/15] more dedup --- nixos/common/default.nix | 3 +- nixos/common/hm-modules/catppuccin.nix | 40 ++++++++ nixos/common/hm-modules/default.nix | 4 +- nixos/common/hm-modules/nvim.nix | 101 ++++++++++++++++++++ nixos/common/modules/gnome/default.nix | 1 + nixos/hosts/thalassa/aoife/home/default.nix | 15 ++- nixos/hosts/thalassa/aoife/home/neovim.nix | 94 ------------------ nixos/hosts/thalassa/aoife/home/nvim.lua | 0 nixos/hosts/thalassa/aoife/home/theme.nix | 32 ------- nixos/hosts/thalassa/eevee/home/default.nix | 8 +- nixos/hosts/thalassa/eevee/home/neovim.nix | 94 ------------------ nixos/hosts/thalassa/eevee/home/nvim.lua | 0 12 files changed, 159 insertions(+), 233 deletions(-) create mode 100644 nixos/common/hm-modules/catppuccin.nix create mode 100644 nixos/common/hm-modules/nvim.nix delete mode 100644 nixos/hosts/thalassa/aoife/home/neovim.nix delete mode 100644 nixos/hosts/thalassa/aoife/home/nvim.lua delete mode 100644 nixos/hosts/thalassa/aoife/home/theme.nix delete mode 100644 nixos/hosts/thalassa/eevee/home/neovim.nix delete mode 100644 nixos/hosts/thalassa/eevee/home/nvim.lua diff --git a/nixos/common/default.nix b/nixos/common/default.nix index 09ef92a..7d08263 100644 --- a/nixos/common/default.nix +++ b/nixos/common/default.nix @@ -6,7 +6,8 @@ nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nix.registry.nixpkgs.flake = inputs.nixpkgs; - home-manager.sharedModules = [ ./hm-modules ]; + home-manager.sharedModules = + [ ./hm-modules inputs.nixvim.homeManagerModules.nixvim ]; vault-secrets = let inherit (config.networking) domain hostName; diff --git a/nixos/common/hm-modules/catppuccin.nix b/nixos/common/hm-modules/catppuccin.nix new file mode 100644 index 0000000..a60b67b --- /dev/null +++ b/nixos/common/hm-modules/catppuccin.nix @@ -0,0 +1,40 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.themes.v.catppuccin; +in { + options.themes.v.catppuccin = { + enable = mkEnableOption "catppuccin"; + }; + config = let + theme = "Catppuccin-Pink-Dark"; + cursorTheme = config.home.pointerCursor.name; + in mkIf cfg.enable { + home.pointerCursor = { + name = "Bibata_Ghost"; + size = 24; + package = pkgs.bibata-cursors-translucent; + }; + + gtk = { + enable = true; + theme = { + name = theme; + package = pkgs.catppuccin-gtk; + }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme.override { color = "violet"; }; + }; + cursorTheme = { + name = cursorTheme; + inherit (config.home.pointerCursor) package size; + }; + }; + + programs.vscode = { + userSettings."workbench.colorTheme" = "Catppuccin Frappé"; + extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ]; + }; + }; +} + diff --git a/nixos/common/hm-modules/default.nix b/nixos/common/hm-modules/default.nix index 9676a72..844e7b6 100644 --- a/nixos/common/hm-modules/default.nix +++ b/nixos/common/hm-modules/default.nix @@ -1,5 +1,7 @@ { ... }: { imports = [ + ./catppuccin.nix + ./nvim.nix ./riff.nix ]; -} \ No newline at end of file +} diff --git a/nixos/common/hm-modules/nvim.nix b/nixos/common/hm-modules/nvim.nix new file mode 100644 index 0000000..2541697 --- /dev/null +++ b/nixos/common/hm-modules/nvim.nix @@ -0,0 +1,101 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.programs.v.nvim; +in { + options.programs.v.nvim = { + enable = mkEnableOption "nvim"; + }; + config = mkIf cfg.enable { + programs.nixvim = { + enable = true; + package = pkgs.neovim-unwrapped; + vimAlias = true; + + globals = { mapleader = " "; }; + + maps.normal = { + "ff" = "lua require('telescope.builtin').find_files()"; + "fg" = "lua require('telescope.builtin').live_grep()"; + "" = + "lua require('Comment.api').toggle.linewise.current()"; # map ctrl+/ to commenting code + }; + + extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ]; + + colorscheme = "catppuccin-frappe"; + + extraConfigLua = ""; + + plugins = { + bufferline.enable = true; + nix.enable = true; + treesitter = { + enable = true; + nixGrammars = true; + # ensureInstalled = [ ]; + }; + surround.enable = true; + fugitive.enable = true; + gitgutter.enable = true; + lualine = { + enable = true; + theme = "catppuccin"; + }; + telescope = { + enable = true; + extensions.fzf-native.enable = true; + extensions.fzf-native.fuzzy = true; + }; + comment-nvim = { enable = true; }; + lsp = { + enable = true; + servers.rust-analyzer.enable = true; + servers.rnix-lsp.enable = true; + servers.pyright.enable = true; + servers.elixirls.enable = true; + servers.clangd.enable = true; + }; + trouble.enable = true; + lspkind.enable = true; + nvim-cmp = { + enable = true; + autoEnableSources = true; + sources = [ + { name = "nvim_lsp"; } + { name = "cmp-latex-symbols"; } + { + name = "luasnip"; + option = { show_autosnippets = true; }; + } + { name = "cmp-spell"; } + { name = "cmp-rg"; } + { name = "path"; } + { name = "buffer"; } + ]; + snippet.expand = "luasnip"; + mappingPresets = [ "insert" "cmdline" ]; + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = { + modes = [ "i" "s" ]; + action = '' + function(fallback) + local luasnip = require('luasnip') + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expandable() then + luasnip.expand() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end + ''; + }; + }; + }; + }; + }; + }; +} diff --git a/nixos/common/modules/gnome/default.nix b/nixos/common/modules/gnome/default.nix index 4b72f6b..b4040dc 100644 --- a/nixos/common/modules/gnome/default.nix +++ b/nixos/common/modules/gnome/default.nix @@ -9,6 +9,7 @@ in { services.xserver.enable = true; services.xserver.excludePackages = [ pkgs.xterm ]; + # Add Home-manager dconf stuff home-manager.sharedModules = [ ./dconf.nix ]; diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix index 84adb33..14b3411 100644 --- a/nixos/hosts/thalassa/aoife/home/default.nix +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -8,15 +8,20 @@ let in { programs.home-manager.enable = true; + imports = []; + home.username = "victor"; home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ ./theme.nix ./neovim.nix ]; + # Enable catppuccin theme + themes.v.catppuccin.enable = true; # Custom dconf settings dconf.settings."org/gnome/desktop/input-sources".xkb-options = [ "caps:swapescape"]; + programs.v.nvim.enable = true; + home.packages = with pkgs; [ btop calibre @@ -188,13 +193,5 @@ in { templates = "${home}/.templates"; videos = "${home}/cloud/Videos"; }; - - # xdg.configFile."electron-flags.conf".text = '' - # --enable-features=UseOzonePlatform - # --ozone-platform=wayland - # --enable-features=WaylandWindowDecorations - # --ozone-platform-hint=auto - # ''; - services.syncthing.enable = true; } diff --git a/nixos/hosts/thalassa/aoife/home/neovim.nix b/nixos/hosts/thalassa/aoife/home/neovim.nix deleted file mode 100644 index 494acd2..0000000 --- a/nixos/hosts/thalassa/aoife/home/neovim.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ inputs, pkgs, ... }: { - imports = [ inputs.nixvim.homeManagerModules.nixvim ]; - programs.nixvim = { - enable = true; - package = pkgs.neovim-unwrapped; - vimAlias = true; - - globals = { mapleader = " "; }; - - maps.normal = { - "ff" = "lua require('telescope.builtin').find_files()"; - "fg" = "lua require('telescope.builtin').live_grep()"; - "" = - "lua require('Comment.api').toggle.linewise.current()"; # map ctrl+/ to commenting code - }; - - extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ]; - - colorscheme = "catppuccin-frappe"; - - extraConfigLua = builtins.readFile ./nvim.lua; - - plugins = { - bufferline.enable = true; - nix.enable = true; - treesitter = { - enable = true; - nixGrammars = true; - # ensureInstalled = [ ]; - }; - surround.enable = true; - fugitive.enable = true; - gitgutter.enable = true; - lualine = { - enable = true; - theme = "catppuccin"; - }; - telescope = { - enable = true; - extensions.fzf-native.enable = true; - extensions.fzf-native.fuzzy = true; - }; - comment-nvim = { enable = true; }; - lsp = { - enable = true; - servers.rust-analyzer.enable = true; - servers.rnix-lsp.enable = true; - servers.pyright.enable = true; - servers.elixirls.enable = true; - servers.clangd.enable = true; - }; - trouble.enable = true; - lspkind.enable = true; - nvim-cmp = { - enable = true; - autoEnableSources = true; - sources = [ - { name = "nvim_lsp"; } - { name = "cmp-latex-symbols"; } - { - name = "luasnip"; - option = { show_autosnippets = true; }; - } - { name = "cmp-spell"; } - { name = "cmp-rg"; } - { name = "path"; } - { name = "buffer"; } - ]; - snippet.expand = "luasnip"; - mappingPresets = [ "insert" "cmdline" ]; - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = { - modes = [ "i" "s" ]; - action = '' - function(fallback) - local luasnip = require('luasnip') - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end - ''; - }; - }; - }; - }; - }; -} diff --git a/nixos/hosts/thalassa/aoife/home/nvim.lua b/nixos/hosts/thalassa/aoife/home/nvim.lua deleted file mode 100644 index e69de29..0000000 diff --git a/nixos/hosts/thalassa/aoife/home/theme.nix b/nixos/hosts/thalassa/aoife/home/theme.nix deleted file mode 100644 index f48e44c..0000000 --- a/nixos/hosts/thalassa/aoife/home/theme.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, pkgs, config, ... }: -let - theme = "Catppuccin-Pink-Dark"; - cursorTheme = config.home.pointerCursor.name; -in { - home.pointerCursor = { - name = "Bibata_Ghost"; - size = 24; - package = pkgs.bibata-cursors-translucent; - }; - - gtk = { - enable = true; - theme = { - name = theme; - package = pkgs.catppuccin-gtk; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme.override { color = "violet"; }; - }; - cursorTheme = { - name = cursorTheme; - inherit (config.home.pointerCursor) package size; - }; - }; - - programs.vscode = { - userSettings."workbench.colorTheme" = "Catppuccin Frappé"; - extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ]; - }; -} diff --git a/nixos/hosts/thalassa/eevee/home/default.nix b/nixos/hosts/thalassa/eevee/home/default.nix index 6bf9335..22b8f6d 100644 --- a/nixos/hosts/thalassa/eevee/home/default.nix +++ b/nixos/hosts/thalassa/eevee/home/default.nix @@ -11,12 +11,16 @@ in { home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - imports = [ ./theme.nix ./neovim.nix ]; - dconf.settings."org/gnome/desktop/peripherals/mouse" = { accel-profile = "flat"; }; + # Enable my neovim config + programs.v.nvim.enable = true; + + # Enable catppuccin theme + themes.v.catppuccin.enable = true; + home.packages = with pkgs; [ btop calibre diff --git a/nixos/hosts/thalassa/eevee/home/neovim.nix b/nixos/hosts/thalassa/eevee/home/neovim.nix deleted file mode 100644 index 494acd2..0000000 --- a/nixos/hosts/thalassa/eevee/home/neovim.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ inputs, pkgs, ... }: { - imports = [ inputs.nixvim.homeManagerModules.nixvim ]; - programs.nixvim = { - enable = true; - package = pkgs.neovim-unwrapped; - vimAlias = true; - - globals = { mapleader = " "; }; - - maps.normal = { - "ff" = "lua require('telescope.builtin').find_files()"; - "fg" = "lua require('telescope.builtin').live_grep()"; - "" = - "lua require('Comment.api').toggle.linewise.current()"; # map ctrl+/ to commenting code - }; - - extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim luasnip ]; - - colorscheme = "catppuccin-frappe"; - - extraConfigLua = builtins.readFile ./nvim.lua; - - plugins = { - bufferline.enable = true; - nix.enable = true; - treesitter = { - enable = true; - nixGrammars = true; - # ensureInstalled = [ ]; - }; - surround.enable = true; - fugitive.enable = true; - gitgutter.enable = true; - lualine = { - enable = true; - theme = "catppuccin"; - }; - telescope = { - enable = true; - extensions.fzf-native.enable = true; - extensions.fzf-native.fuzzy = true; - }; - comment-nvim = { enable = true; }; - lsp = { - enable = true; - servers.rust-analyzer.enable = true; - servers.rnix-lsp.enable = true; - servers.pyright.enable = true; - servers.elixirls.enable = true; - servers.clangd.enable = true; - }; - trouble.enable = true; - lspkind.enable = true; - nvim-cmp = { - enable = true; - autoEnableSources = true; - sources = [ - { name = "nvim_lsp"; } - { name = "cmp-latex-symbols"; } - { - name = "luasnip"; - option = { show_autosnippets = true; }; - } - { name = "cmp-spell"; } - { name = "cmp-rg"; } - { name = "path"; } - { name = "buffer"; } - ]; - snippet.expand = "luasnip"; - mappingPresets = [ "insert" "cmdline" ]; - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = { - modes = [ "i" "s" ]; - action = '' - function(fallback) - local luasnip = require('luasnip') - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end - ''; - }; - }; - }; - }; - }; -} diff --git a/nixos/hosts/thalassa/eevee/home/nvim.lua b/nixos/hosts/thalassa/eevee/home/nvim.lua deleted file mode 100644 index e69de29..0000000 From e13781ffb2260f893af46d40a79b6d93bf5f78ef Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 25 Apr 2023 10:04:50 +0200 Subject: [PATCH 13/15] even more dedupe --- nixos/common/desktop/README.md | 10 +- nixos/common/desktop/home.nix | 94 +++++++++ nixos/common/hm-modules/default.nix | 1 + nixos/common/hm-modules/vscode.nix | 68 +++++++ nixos/common/modules/gnome/default.nix | 2 +- .../modules/gnome/{dconf.nix => hm.nix} | 34 ++++ nixos/hosts/thalassa/aoife/home/default.nix | 191 +----------------- nixos/hosts/thalassa/eevee/home/default.nix | 183 +---------------- 8 files changed, 213 insertions(+), 370 deletions(-) create mode 100644 nixos/common/desktop/home.nix create mode 100644 nixos/common/hm-modules/vscode.nix rename nixos/common/modules/gnome/{dconf.nix => hm.nix} (67%) diff --git a/nixos/common/desktop/README.md b/nixos/common/desktop/README.md index 48683a6..0db6d20 100644 --- a/nixos/common/desktop/README.md +++ b/nixos/common/desktop/README.md @@ -1 +1,9 @@ -# Common NixOS Config shared between desktop and laptop +# Common Desktop Config +This is where I store the NixOS config that is common between +my laptop and desktop + +## Files +* `./default.nix`: Contains common systemwide configuration + * See also <../modules> +* `./home.nix`: Contains common user-level configuration + * See also <../hm-modules> diff --git a/nixos/common/desktop/home.nix b/nixos/common/desktop/home.nix new file mode 100644 index 0000000..17e74f3 --- /dev/null +++ b/nixos/common/desktop/home.nix @@ -0,0 +1,94 @@ +{ pkgs, inputs, config, ... }: +let + tex = pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-full; + dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; + }; + my-python-packages = ps: with ps; [ pandas requests numpy ]; +in { + home.packages = with pkgs; [ + btop + calibre + element-desktop + fusee-launcher + gcc + gimp + inputs.comma.packages.${pkgs.system}.default + inputs.webcord.packages.${pkgs.system}.default + jetbrains.clion + jetbrains.idea-ultimate + mullvad-vpn + neofetch + nixfmt + nixpkgs-review + (python3.withPackages my-python-packages) + plex-media-player + rustup + solo2-cli + tex + yt-dlp + ]; + + themes.v.catppuccin.enable = true; + programs.v.nvim.enable = true; + programs.v.vscode.enable = true; + + programs.riff = { + enable = true; + direnv = true; + }; + programs.exa = { + enable = true; + enableAliases = true; + }; + + programs.bat.enable = true; + + programs.git = { + enable = true; + package = pkgs.gitAndTools.gitFull; + userName = "Victor"; + userEmail = "victor@xirion.net"; + lfs.enable = true; + # delta.enable = true; + extraConfig = { + push.autoSetupRemote = true; + init.defaultBranch = "main"; + }; + }; + + programs.tmux = { + enable = true; + shortcut = "b"; + terminal = "screen-256color"; + clock24 = true; + }; + + programs.firefox.enable = true; + + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + + programs.zsh = { + enable = true; + sessionVariables = { DIRENV_LOG_FORMAT = ""; }; + }; + + # Syncthing + services.syncthing.enable = true; + xdg.userDirs = let home = config.home.homeDirectory; + in { + enable = true; + createDirectories = true; + desktop = "${home}/.desktop"; + documents = "${home}/cloud/Documents"; + download = "${home}/dl"; + music = "${home}/cloud/Music"; + pictures = "${home}/cloud/Pictures"; + publicShare = "${home}/.publicShare"; + templates = "${home}/.templates"; + videos = "${home}/cloud/Videos"; + }; +} diff --git a/nixos/common/hm-modules/default.nix b/nixos/common/hm-modules/default.nix index 844e7b6..8dabd6c 100644 --- a/nixos/common/hm-modules/default.nix +++ b/nixos/common/hm-modules/default.nix @@ -3,5 +3,6 @@ ./catppuccin.nix ./nvim.nix ./riff.nix + ./vscode.nix ]; } diff --git a/nixos/common/hm-modules/vscode.nix b/nixos/common/hm-modules/vscode.nix new file mode 100644 index 0000000..5a2b95a --- /dev/null +++ b/nixos/common/hm-modules/vscode.nix @@ -0,0 +1,68 @@ +{ config, pkgs, lib, ... }: +with lib; +let cfg = config.programs.v.vscode; +in { + options.programs.v.vscode = { enable = mkEnableOption "vscode"; }; + config = mkIf cfg.enable { + programs.vscode = { + enable = true; + package = pkgs.vscode; + userSettings = { + "ltex.language" = "en-GB"; + "latex-workshop.linting.chktex.enabled" = true; + "latex-workshop.latex.clean.subfolder.enabled" = true; + "latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; + "editor.fontFamily" = + "'DejaVuSansMono Nerd Font', 'monospace', monospace"; + "keyboard.dispatch" = "keyCode"; + "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + "terminal.integrated.defaultProfile.linux" = "zsh"; + "nix.enableLanguageServer" = true; # Enable LSP. + "nix.serverPath" = "${pkgs.nil}/bin/nil"; + "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; + "rust-analyzer.checkOnSave.command" = "clippy"; + "debug.allowBreakpointsEverywhere" = true; + # Don't index unecessary things + "files.exclude" = { + "**/.vscode" = true; + "**/.git" = true; + "**/.svn" = true; + "**/.hg" = true; + "**/.deps" = true; + "**/CVS" = true; + "**/.DS_Store" = true; + "/bin" = true; + "/boot" = true; + "/cdrom" = true; + "/dev" = true; + "/proc" = true; + "/etc" = true; + "/nix" = true; + }; + }; + extensions = with pkgs.vscode-extensions; + with pkgs.v.vscode-extensions; [ + brettm12345.nixfmt-vscode + codezombiech.gitignore + editorconfig.editorconfig + foxundermoon.shell-format + james-yu.latex-workshop + jnoortheen.nix-ide + matklad.rust-analyzer + mkhl.direnv + ms-vscode-remote.remote-ssh + ms-vscode.cpptools + platformio.platformio-ide + redhat.vscode-yaml + tamasfe.even-better-toml + valentjn.vscode-ltex + vscodevim.vim + vadimcn.vscode-lldb + xaver.clang-format + sumneko.lua + ]; + }; + + }; +} + diff --git a/nixos/common/modules/gnome/default.nix b/nixos/common/modules/gnome/default.nix index b4040dc..04d5949 100644 --- a/nixos/common/modules/gnome/default.nix +++ b/nixos/common/modules/gnome/default.nix @@ -11,7 +11,7 @@ in { # Add Home-manager dconf stuff home-manager.sharedModules = [ - ./dconf.nix + ./hm.nix ]; # Configure keymap in X11 diff --git a/nixos/common/modules/gnome/dconf.nix b/nixos/common/modules/gnome/hm.nix similarity index 67% rename from nixos/common/modules/gnome/dconf.nix rename to nixos/common/modules/gnome/hm.nix index 14fa0b9..cba3ba8 100644 --- a/nixos/common/modules/gnome/dconf.nix +++ b/nixos/common/modules/gnome/hm.nix @@ -16,6 +16,40 @@ let "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${name}") binds; in { + xdg.mimeApps.enable = true; + xdg.mimeApps.defaultApplications = { + "text/html" = "firefox.desktop"; + "text/plain" = "org.gnome.TextEditor.desktop"; + "application/pdf" = "org.gnome.Evince.desktop"; + + # Images + "image/bmp" = "org.gnome.eog.desktop"; + "image/gif" = "org.gnome.eog.desktop"; + "image/jpg" = "org.gnome.eog.desktop"; + "image/pjpeg" = "org.gnome.eog.desktop"; + "image/png" = "org.gnome.eog.desktop"; + "image/tiff" = "org.gnome.eog.desktop"; + "image/webp" = "org.gnome.eog.desktop"; + "image/x-bmp" = "org.gnome.eog.desktop"; + "image/x-gray" = "org.gnome.eog.desktop"; + "image/x-icb" = "org.gnome.eog.desktop"; + "image/x-ico" = "org.gnome.eog.desktop"; + "image/x-png" = "org.gnome.eog.desktop"; + "image/x-portable-anymap" = "org.gnome.eog.desktop"; + "image/x-portable-bitmap" = "org.gnome.eog.desktop"; + "image/x-portable-graymap" = "org.gnome.eog.desktop"; + "image/x-portable-pixmap" = "org.gnome.eog.desktop"; + "image/x-xbitmap" = "org.gnome.eog.desktop"; + "image/x-xpixmap" = "org.gnome.eog.desktop"; + "image/x-pcx" = "org.gnome.eog.desktop"; + "image/svg+xml" = "org.gnome.eog.desktop"; + "image/svg+xml-compressed" = "org.gnome.eog.desktop"; + "image/vnd.wap.wbmp" = "org.gnome.eog.desktop"; + "image/x-icns" = "org.gnome.eog.desktop"; + }; + + + dconf.settings = { "org/gnome/desktop/input-sources" = { sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ]; diff --git a/nixos/hosts/thalassa/aoife/home/default.nix b/nixos/hosts/thalassa/aoife/home/default.nix index 14b3411..c84a073 100644 --- a/nixos/hosts/thalassa/aoife/home/default.nix +++ b/nixos/hosts/thalassa/aoife/home/default.nix @@ -1,197 +1,14 @@ -{ lib, config, pkgs, inputs, ... }: -let - tex = pkgs.texlive.combine { - inherit (pkgs.texlive) scheme-full; - dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; - }; - my-python-packages = ps: with ps; [ pandas requests numpy ]; -in { +{ ... }: { programs.home-manager.enable = true; - imports = []; - home.username = "victor"; home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; - # Enable catppuccin theme - themes.v.catppuccin.enable = true; + imports = [ ../../../../common/desktop/home.nix ]; # Custom dconf settings - dconf.settings."org/gnome/desktop/input-sources".xkb-options = [ "caps:swapescape"]; - - programs.v.nvim.enable = true; - - home.packages = with pkgs; [ - btop - calibre - element-desktop - fusee-launcher - gcc - gimp - inputs.comma.packages.${pkgs.system}.default - inputs.webcord.packages.${pkgs.system}.default - jetbrains.clion - jetbrains.idea-ultimate - mullvad-vpn - neofetch - nixfmt - nixpkgs-review - (python3.withPackages my-python-packages) - plex-media-player - rustup - solo2-cli - tex - yt-dlp - ]; - - programs.riff = { - enable = true; - direnv = true; + dconf.settings."org/gnome/desktop/input-sources" = { + xkb-options = [ "caps:swapescape" ]; }; - - xdg.mimeApps.enable = true; - xdg.mimeApps.defaultApplications = { - "text/html" = "firefox.desktop"; - "text/plain" = "org.gnome.TextEditor.desktop"; - "application/pdf" = "org.gnome.Evince.desktop"; - - # Images - "image/bmp" = "org.gnome.eog.desktop"; - "image/gif" = "org.gnome.eog.desktop"; - "image/jpg" = "org.gnome.eog.desktop"; - "image/pjpeg" = "org.gnome.eog.desktop"; - "image/png" = "org.gnome.eog.desktop"; - "image/tiff" = "org.gnome.eog.desktop"; - "image/webp" = "org.gnome.eog.desktop"; - "image/x-bmp" = "org.gnome.eog.desktop"; - "image/x-gray" = "org.gnome.eog.desktop"; - "image/x-icb" = "org.gnome.eog.desktop"; - "image/x-ico" = "org.gnome.eog.desktop"; - "image/x-png" = "org.gnome.eog.desktop"; - "image/x-portable-anymap" = "org.gnome.eog.desktop"; - "image/x-portable-bitmap" = "org.gnome.eog.desktop"; - "image/x-portable-graymap" = "org.gnome.eog.desktop"; - "image/x-portable-pixmap" = "org.gnome.eog.desktop"; - "image/x-xbitmap" = "org.gnome.eog.desktop"; - "image/x-xpixmap" = "org.gnome.eog.desktop"; - "image/x-pcx" = "org.gnome.eog.desktop"; - "image/svg+xml" = "org.gnome.eog.desktop"; - "image/svg+xml-compressed" = "org.gnome.eog.desktop"; - "image/vnd.wap.wbmp" = "org.gnome.eog.desktop"; - "image/x-icns" = "org.gnome.eog.desktop"; - }; - - programs.exa = { - enable = true; - enableAliases = true; - }; - - programs.bat.enable = true; - - programs.git = { - enable = true; - package = pkgs.gitAndTools.gitFull; - userName = "Victor"; - userEmail = "victor@xirion.net"; - lfs.enable = true; - # delta.enable = true; - extraConfig = { - push.autoSetupRemote = true; - init.defaultBranch = "main"; - }; - }; - - programs.tmux = { - enable = true; - shortcut = "b"; - terminal = "screen-256color"; - clock24 = true; - }; - - programs.firefox.enable = true; - - programs.vscode = { - enable = true; - package = pkgs.vscode; - userSettings = { - "ltex.language" = "en-GB"; - "latex-workshop.linting.chktex.enabled" = true; - "latex-workshop.latex.clean.subfolder.enabled" = true; - "latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; - "editor.fontFamily" = - "'DejaVuSansMono Nerd Font', 'monospace', monospace"; - "keyboard.dispatch" = "keyCode"; - "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; - "terminal.integrated.defaultProfile.linux" = "zsh"; - "nix.enableLanguageServer" = true; # Enable LSP. - "nix.serverPath" = "${pkgs.nil}/bin/nil"; - "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; - "rust-analyzer.checkOnSave.command" = "clippy"; - "debug.allowBreakpointsEverywhere" = true; - # Don't index unecessary things - "files.exclude" = { - "**/.vscode" = true; - "**/.git" = true; - "**/.svn" = true; - "**/.hg" = true; - "**/.deps" = true; - "**/CVS" = true; - "**/.DS_Store" = true; - "/bin" = true; - "/boot" = true; - "/cdrom" = true; - "/dev" = true; - "/proc" = true; - "/etc" = true; - "/nix" = true; - }; - }; - extensions = with pkgs.vscode-extensions; - with pkgs.v.vscode-extensions; [ - brettm12345.nixfmt-vscode - codezombiech.gitignore - editorconfig.editorconfig - foxundermoon.shell-format - james-yu.latex-workshop - jnoortheen.nix-ide - matklad.rust-analyzer - mkhl.direnv - ms-vscode-remote.remote-ssh - ms-vscode.cpptools - platformio.platformio-ide - redhat.vscode-yaml - tamasfe.even-better-toml - valentjn.vscode-ltex - vscodevim.vim - vadimcn.vscode-lldb - xaver.clang-format - sumneko.lua - ]; - }; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - programs.zsh = { - enable = true; - sessionVariables = { DIRENV_LOG_FORMAT = ""; }; - }; - - xdg.userDirs = let home = config.home.homeDirectory; - in { - enable = true; - createDirectories = true; - desktop = "${home}/.desktop"; - documents = "${home}/cloud/Documents"; - download = "${home}/dl"; - music = "${home}/cloud/Music"; - pictures = "${home}/cloud/Pictures"; - publicShare = "${home}/.publicShare"; - templates = "${home}/.templates"; - videos = "${home}/cloud/Videos"; - }; - services.syncthing.enable = true; } diff --git a/nixos/hosts/thalassa/eevee/home/default.nix b/nixos/hosts/thalassa/eevee/home/default.nix index 22b8f6d..cbc0a03 100644 --- a/nixos/hosts/thalassa/eevee/home/default.nix +++ b/nixos/hosts/thalassa/eevee/home/default.nix @@ -11,188 +11,9 @@ in { home.homeDirectory = "/home/victor"; home.stateVersion = "23.05"; + imports = [ ../../../../common/desktop/home.nix ]; + dconf.settings."org/gnome/desktop/peripherals/mouse" = { accel-profile = "flat"; }; - - # Enable my neovim config - programs.v.nvim.enable = true; - - # Enable catppuccin theme - themes.v.catppuccin.enable = true; - - home.packages = with pkgs; [ - btop - calibre - element-desktop - fusee-launcher - gcc - gimp - inputs.comma.packages.${pkgs.system}.default - inputs.webcord.packages.${pkgs.system}.default - jetbrains.clion - jetbrains.idea-ultimate - mullvad-vpn - neofetch - nixfmt - nixpkgs-review - python3 - plex-media-player - rustup - solo2-cli - tex - yt-dlp - wootility - ]; - - programs.riff = { - enable = true; - direnv = true; - }; - - xdg.mimeApps.enable = true; - xdg.mimeApps.defaultApplications = { - "text/html" = "firefox.desktop"; - "text/plain" = "org.gnome.TextEditor.desktop"; - "application/pdf" = "org.gnome.Evince.desktop"; - - # Images - "image/bmp" = "org.gnome.eog.desktop"; - "image/gif" = "org.gnome.eog.desktop"; - "image/jpg" = "org.gnome.eog.desktop"; - "image/pjpeg" = "org.gnome.eog.desktop"; - "image/png" = "org.gnome.eog.desktop"; - "image/tiff" = "org.gnome.eog.desktop"; - "image/webp" = "org.gnome.eog.desktop"; - "image/x-bmp" = "org.gnome.eog.desktop"; - "image/x-gray" = "org.gnome.eog.desktop"; - "image/x-icb" = "org.gnome.eog.desktop"; - "image/x-ico" = "org.gnome.eog.desktop"; - "image/x-png" = "org.gnome.eog.desktop"; - "image/x-portable-anymap" = "org.gnome.eog.desktop"; - "image/x-portable-bitmap" = "org.gnome.eog.desktop"; - "image/x-portable-graymap" = "org.gnome.eog.desktop"; - "image/x-portable-pixmap" = "org.gnome.eog.desktop"; - "image/x-xbitmap" = "org.gnome.eog.desktop"; - "image/x-xpixmap" = "org.gnome.eog.desktop"; - "image/x-pcx" = "org.gnome.eog.desktop"; - "image/svg+xml" = "org.gnome.eog.desktop"; - "image/svg+xml-compressed" = "org.gnome.eog.desktop"; - "image/vnd.wap.wbmp" = "org.gnome.eog.desktop"; - "image/x-icns" = "org.gnome.eog.desktop"; - }; - - programs.exa = { - enable = true; - enableAliases = true; - }; - - programs.bat.enable = true; - - programs.git = { - enable = true; - package = pkgs.gitAndTools.gitFull; - userName = "Victor"; - userEmail = "victor@xirion.net"; - lfs.enable = true; - # delta.enable = true; - extraConfig = { - push.autoSetupRemote = true; - init.defaultBranch = "main"; - }; - }; - - programs.tmux = { - enable = true; - shortcut = "b"; - terminal = "screen-256color"; - clock24 = true; - }; - - programs.firefox.enable = true; - - programs.vscode = { - enable = true; - package = pkgs.vscode; - userSettings = { - "ltex.language" = "en-GB"; - "latex-workshop.linting.chktex.enabled" = true; - "latex-workshop.latex.clean.subfolder.enabled" = true; - "latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%"; - "editor.fontFamily" = - "'DejaVuSansMono Nerd Font', 'monospace', monospace"; - "keyboard.dispatch" = "keyCode"; - "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; - "terminal.integrated.defaultProfile.linux" = "zsh"; - "nix.enableLanguageServer" = true; # Enable LSP. - "nix.serverPath" = "${pkgs.nil}/bin/nil"; - "[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; }; - "rust-analyzer.checkOnSave.command" = "clippy"; - "debug.allowBreakpointsEverywhere" = true; - # Don't index unecessary things - "files.exclude" = { - "**/.vscode" = true; - "**/.git" = true; - "**/.svn" = true; - "**/.hg" = true; - "**/.deps" = true; - "**/CVS" = true; - "**/.DS_Store" = true; - "/bin" = true; - "/boot" = true; - "/cdrom" = true; - "/dev" = true; - "/proc" = true; - "/etc" = true; - "/nix" = true; - }; - }; - extensions = with pkgs.vscode-extensions; - with pkgs.v.vscode-extensions; [ - brettm12345.nixfmt-vscode - codezombiech.gitignore - editorconfig.editorconfig - foxundermoon.shell-format - james-yu.latex-workshop - jnoortheen.nix-ide - matklad.rust-analyzer - mkhl.direnv - ms-vscode-remote.remote-ssh - ms-vscode.cpptools - platformio.platformio-ide - redhat.vscode-yaml - tamasfe.even-better-toml - valentjn.vscode-ltex - vscodevim.vim - vadimcn.vscode-lldb - xaver.clang-format - sumneko.lua - ]; - }; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - programs.zsh = { - enable = true; - sessionVariables = { DIRENV_LOG_FORMAT = ""; }; - }; - - xdg.userDirs = let home = config.home.homeDirectory; - in { - enable = true; - createDirectories = true; - desktop = "${home}/.desktop"; - documents = "${home}/cloud/Documents"; - download = "${home}/dl"; - music = "${home}/cloud/Music"; - pictures = "${home}/cloud/Pictures"; - publicShare = "${home}/.publicShare"; - templates = "${home}/.templates"; - videos = "${home}/cloud/Videos"; - }; - - services.syncthing.enable = true; } From 3c63dd113c1ec3d9f6453407e4578bed6068170d Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 25 Apr 2023 10:29:08 +0200 Subject: [PATCH 14/15] deemix-gui, ded --- nixos/common/desktop/README.md | 4 +-- nixos/common/desktop/home.nix | 2 ++ nixos/common/modules/gnome/default.nix | 18 ++++++++---- nixos/pkgs/deemix-gui/default.nix | 40 -------------------------- nixos/pkgs/default.nix | 2 -- 5 files changed, 16 insertions(+), 50 deletions(-) delete mode 100644 nixos/pkgs/deemix-gui/default.nix diff --git a/nixos/common/desktop/README.md b/nixos/common/desktop/README.md index 0db6d20..3238074 100644 --- a/nixos/common/desktop/README.md +++ b/nixos/common/desktop/README.md @@ -4,6 +4,6 @@ my laptop and desktop ## Files * `./default.nix`: Contains common systemwide configuration - * See also <../modules> + * See also my NixOS [modules](../modules), specifically gnome * `./home.nix`: Contains common user-level configuration - * See also <../hm-modules> + * See also my Home-Manager [modules](../hm-modules) diff --git a/nixos/common/desktop/home.nix b/nixos/common/desktop/home.nix index 17e74f3..6458b8d 100644 --- a/nixos/common/desktop/home.nix +++ b/nixos/common/desktop/home.nix @@ -29,6 +29,7 @@ in { yt-dlp ]; + # Enable my own hm modules themes.v.catppuccin.enable = true; programs.v.nvim.enable = true; programs.v.vscode.enable = true; @@ -37,6 +38,7 @@ in { enable = true; direnv = true; }; + programs.exa = { enable = true; enableAliases = true; diff --git a/nixos/common/modules/gnome/default.nix b/nixos/common/modules/gnome/default.nix index 04d5949..90b95a5 100644 --- a/nixos/common/modules/gnome/default.nix +++ b/nixos/common/modules/gnome/default.nix @@ -1,18 +1,24 @@ -{ config, pkgs, lib, flat_hosts, ... }: +{ config, pkgs, lib, ... }: with lib; let cfg = config.services.v.gnome; - in { - options.services.v.gnome = { enable = mkEnableOption "v.gnome"; }; + options.services.v.gnome = { + enable = mkEnableOption "v.gnome"; + hm = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable home manager integration to set default dconf values + ''; + }; + }; config = mkIf cfg.enable { services.xserver.enable = true; services.xserver.excludePackages = [ pkgs.xterm ]; # Add Home-manager dconf stuff - home-manager.sharedModules = [ - ./hm.nix - ]; + home-manager.sharedModules = mkIf cfg.hm [ ./hm.nix ]; # Configure keymap in X11 services.xserver = { diff --git a/nixos/pkgs/deemix-gui/default.nix b/nixos/pkgs/deemix-gui/default.nix deleted file mode 100644 index cb76d31..0000000 --- a/nixos/pkgs/deemix-gui/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron }: - -stdenv.mkDerivation rec { - pname = "deemix-gui"; - version = "2022-08-20"; - - src = fetchurl { - url = "https://download.deemix.app/gui/linux-x64-latest.AppImage"; - sha256 = "sha256-e2neemsAzGniBpXIPYbKk5LQHoYLvFj5/8QszCcoTYM="; - name = "${pname}-${version}.AppImage"; - }; - - appimageContents = appimageTools.extractType2 { - name = "${pname}-${version}"; - inherit src; - }; - - dontUnpack = true; - dontConfigure = true; - dontBuild = true; - - nativeBuildInputs = [ makeWrapper ]; - - installPhase = '' - runHook preInstall - - mkdir -p $out/bin $out/share/${pname} $out/share/applications - - cp -a ${appimageContents}/{locales,resources} $out/share/${pname} - cp -a ${appimageContents}/usr/share/icons $out/share - - runHook postInstall - ''; - - postFixup = '' - makeWrapper ${electron}/bin/electron $out/bin/${pname} --add-flags $out/share/${pname}/resources/app.asar - ''; - - meta = { platforms = [ "x86_64-linux" ]; }; -} diff --git a/nixos/pkgs/default.nix b/nixos/pkgs/default.nix index 3a5edee..d87e564 100644 --- a/nixos/pkgs/default.nix +++ b/nixos/pkgs/default.nix @@ -3,8 +3,6 @@ final: prev: { v = { glitch-soc = prev.callPackage ./glitch-soc { }; - deemix-gui = prev.callPackage ./deemix-gui { }; - unbound = prev.unbound.override { withSystemd = true; withDoH = true; From edffc5306c466b1da9914e599e3ec95756f4a346 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 26 Apr 2023 11:03:26 +0200 Subject: [PATCH 15/15] updates --- flake.lock | 7 ++++--- flake.nix | 2 +- nixos/hosts/thalassa/aoife/hardware.nix | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 2bd8a5a..e7054ea 100644 --- a/flake.lock +++ b/flake.lock @@ -831,15 +831,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1682318825, - "narHash": "sha256-rTFe23xSneBU2AqiwTGnXyQBfIDyJzxRKdLYti4BgB8=", + "lastModified": 1682453498, + "narHash": "sha256-WoWiAd7KZt5Eh6n+qojcivaVpnXKqBsVgpixpV2L9CE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6577af679354e6df48fac646b46178455412abc1", + "rev": "c8018361fa1d1650ee8d4b96294783cf564e8a7f", "type": "github" }, "original": { "owner": "nixos", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 6226498..99fd58c 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ # * https://github.com/Infinidoge/nix-minecraft inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs_22-11.url = "github:nixos/nixpkgs/nixos-22.11"; nur.url = "github:nix-community/NUR"; diff --git a/nixos/hosts/thalassa/aoife/hardware.nix b/nixos/hosts/thalassa/aoife/hardware.nix index 5c89168..2875b28 100644 --- a/nixos/hosts/thalassa/aoife/hardware.nix +++ b/nixos/hosts/thalassa/aoife/hardware.nix @@ -22,6 +22,7 @@ rocm-opencl-icd rocm-opencl-runtime ]; + systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ];