From 4d2f26c98f989b23ace5f33fc3407c51b93255dc Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 8 May 2024 22:53:41 +0100 Subject: [PATCH 01/65] alpine: authentik service --- flake.nix | 5 +- hardware/alpine.nix | 8 ---- lib/mkconf.nix | 1 + nixos/modules/podman.nix | 86 ++++++++++++++++++++++++++++++++++ nixos/services/authentik.nix | 91 ++++++++++++++++++++++++++++++++++++ secrets/secrets.yaml | 13 +++++- 6 files changed, 190 insertions(+), 14 deletions(-) create mode 100644 nixos/modules/podman.nix create mode 100644 nixos/services/authentik.nix diff --git a/flake.nix b/flake.nix index 086c84d..0a5c5ca 100644 --- a/flake.nix +++ b/flake.nix @@ -9,10 +9,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; stylix.url = "github:danth/stylix"; - # hyprland = { - # url = "github:hyprwm/Hyprland/v0.36.0"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; sops-nix.url = "github:Mic92/sops-nix"; }; @@ -71,6 +67,7 @@ ./nixos/services/mautrix/signal.nix ./nixos/services/nextcloud.nix ./nixos/services/ntfy.nix + ./nixos/services/authentik.nix ] []; vm-sway = diff --git a/hardware/alpine.nix b/hardware/alpine.nix index 29a68ee..eff81ed 100644 --- a/hardware/alpine.nix +++ b/hardware/alpine.nix @@ -140,14 +140,6 @@ in { enableACME = true; root = "/srv/www/tristans.cloud"; }; - "auth.tristans.cloud" = { - forceSSL = true; - enableACME = true; - locations."~" = { - proxyPass = "http://localhost:8084"; - proxyWebsockets = true; - }; - }; }; }; security.acme = { diff --git a/lib/mkconf.nix b/lib/mkconf.nix index 8f8e302..f5b3e14 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -15,6 +15,7 @@ in modules = modules ++ [ + ../nixos/modules/podman.nix home-manager.nixosModules.home-manager sops-nix.nixosModules.sops { diff --git a/nixos/modules/podman.nix b/nixos/modules/podman.nix new file mode 100644 index 0000000..921d4dc --- /dev/null +++ b/nixos/modules/podman.nix @@ -0,0 +1,86 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) mkOption types; + mkRunCommand = name: { + image, + command ? "", + environment ? {}, + ports ? [], + volumes ? [], + envFile ? null, + ... + }: '' + ${pkgs.podman}/bin/podman run \ + ${toString (builtins.attrValues (builtins.mapAttrs (name: value: "-e ${name}='${value}'") environment))} \ + ${toString (builtins.map (mapping: "-p ${mapping}") ports)} \ + ${toString (builtins.map (mapping: "-v ${mapping}") volumes)} \ + ${ + if builtins.isNull envFile + then "" + else "--env-file ${toString envFile}" + } \ + --detach --replace \ + --name ${name} \ + ${image} ${command} + ''; + opts = { + config, + name, + ... + }: { + options = { + image = mkOption { + type = types.str; + }; + command = mkOption { + type = types.str; + default = ""; + }; + environment = mkOption { + type = types.attrsOf types.str; + default = {}; + }; + ports = mkOption { + type = types.listOf types.str; + default = []; + }; + volumes = mkOption { + type = types.listOf types.str; + default = []; + }; + envFile = mkOption { + type = types.nullOr types.path; + default = null; + }; + }; + }; + mkService = name: config: { + enable = true; + wants = ["network-online.target"]; + after = ["network-online.target"]; + wantedBy = ["default.target"]; + unitConfig = { + RequiresMountsFor = "/run/containers/storage"; + }; + serviceConfig = { + Environment = "PODMAN_SYSTEMD_UNIT=%n"; + Restart = "on-failure"; + TimeoutStopSec = 70; + ExecStart = mkRunCommand name config; + ExecStop = "${pkgs.podman}/bin/podman stop -t 10 ${name}"; + ExecStopPost = "${pkgs.podman}/bin/podman stop -t 10 ${name}"; + Type = "forking"; + }; + }; +in { + options.podman = mkOption { + type = types.attrsOf (types.submodule opts); + }; + config = { + systemd.services = lib.mapAttrs mkService config.podman; + }; +} diff --git a/nixos/services/authentik.nix b/nixos/services/authentik.nix new file mode 100644 index 0000000..48f5b88 --- /dev/null +++ b/nixos/services/authentik.nix @@ -0,0 +1,91 @@ +{config, ...}: let + inherit (config) sops; + inherit (sops) templates placeholder; + redis_port = "6380"; + authentik_port = "8084"; + postgres = { + user = "authentik"; + db = "authentik"; + port = "5437"; + }; + authentik-config = { + image = "ghcr.io/goauthentik/server:2023.10.7"; + volumes = ["/home/tristan/pods/authentik/media:/media"]; + environment = { + AUTHENTIK_POSTGRESQL__USER = postgres.user; + AUTHENTIK_POSTGRESQL__HOST = "192.168.1.2"; + AUTHENTIK_POSTGRESQL__PORT = postgres.port; + AUTHENTIK_REDIS__HOST = "192.168.1.2"; + AUTHENTIK_REDIS__PORT = redis_port; + AUTHENTIK_EMAIL__FROM = "Authentik "; + AUTHENTIK_DEFAULT_USER_CHANGE_USERNAME = "false"; + }; + envFile = templates."authentik/environment".path; + }; +in { + sops.secrets = { + "authentik/postgres_password" = {}; + "authentik/secret_key" = {}; + "mail/host" = {}; + "mail/port" = {}; + "mail/username" = {}; + "mail/password" = {}; + "mail/ssl" = {}; + }; + sops.templates = { + "authentik/environment" = { + content = '' + AUTHENTIK_POSTGRESQL__PASSWORD="${placeholder."authentik/postgres_password"}" + AUTHENTIK_SECRET_KEY="${placeholder."authentik/secret_key"}" + AUTHENTIK_EMAIL__HOST="${placeholder."mail/host"}" + AUTHENTIK_EMAIL__PORT="${placeholder."mail/port"}" + AUTHENTIK_EMAIL__USERNAME="${placeholder."mail/username"}" + AUTHENTIK_EMAIL__PASSWORD="${placeholder."mail/password"}" + AUTHENTIK_EMAIL__USE_SSL="${placeholder."mail/ssl"}" + ''; + }; + "authentik/postgres_env" = { + content = '' + POSTGRES_PASSWORD="${placeholder."authentik/postgres_password"}" + ''; + }; + }; + + podman.authentik-redis = { + image = "redis:latest"; + ports = ["${redis_port}:6379"]; + }; + + podman.authentik-server = + authentik-config + // { + command = "server"; + ports = ["${authentik_port}:9000" "9084:9300"]; + }; + + podman.authentik-worker = + authentik-config + // { + command = "worker"; + }; + + podman.authentik-postgres = { + image = "docker.io/postgres:14-alpine"; + ports = ["${postgres.port}:5432"]; + volumes = ["/home/tristan/pods/authentik/db:/var/lib/postgresql/data"]; + environment = { + POSTGRES_USER = postgres.user; + POSTGRES_DB = postgres.db; + }; + envFile = templates."authentik/postgres_env".path; + }; + + services.nginx.virtualHosts."auth.tristans.cloud" = { + forceSSL = true; + enableACME = true; + locations."~" = { + proxyPass = "http://localhost:${authentik_port}"; + proxyWebsockets = true; + }; + }; +} diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index e336487..1f59b15 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -19,6 +19,15 @@ mautrix-signal: mautrix-instagram: as_token: ENC[AES256_GCM,data:pNO76BcGejQdCc5X4f/UvSsBIPU6QZCCQTJvwVIXRf3rnb9ewWNMEtYXlqj886yh3g5SgqQ4Uhqby/7vrMxREA==,iv:uYU7ACk4wEPzqUCpt5KBt5Y8LoVIdAlNvdWj5Jm94qM=,tag:vJHOhwJBPlgUPu1SFqI4ew==,type:str] hs_token: ENC[AES256_GCM,data:m1CK8Ae6QyJKgDZm904xMpZ1KgKxEUpmQ1jdKOkjexgwAWjjtYF+RVximtcXwxPg/0jkbK/LMlxA89ic+zajiA==,iv:YLed92mS+2Cpud2f8Gq+zlpSVyPo7RVNGOUPCIRDi94=,tag:rRwhYn88ZZwm5sDI1etR2g==,type:str] +authentik: + postgres_password: ENC[AES256_GCM,data:mdUFP92PQEsvXpgES/iG+zmse0AKJ2c1KdMQDWDWWzWAOn3YSAYJX/N0IIljoGNC,iv:UxFDFYWNBQospGoHlrvLQJyypIszPqpkeJy1IGr6/7I=,tag:99LWrGMaYpfTl0PM4AQaKg==,type:str] + secret_key: ENC[AES256_GCM,data:JWcHd5FLhFt7gitVyv0l5Fc/sVrBlro026CPKrECPRGQHwjWQWsXTbKisM0vCKdB,iv:WN/LXUNrd+DbxfxwotedlYnyzE2D1c6C2e0UgCXUWX8=,tag:CAo6tX5RGdg67giMWa459g==,type:str] +mail: + host: ENC[AES256_GCM,data:TpJCxb8/qtGHA7ZQNFxRfzY0jz82,iv:+hjhL2jbMP9NWYub/etBhFXxAfzoIEneepRw5uHL8bs=,tag:J5Rb6BiFKqgqxZPFSGtXhA==,type:str] + port: ENC[AES256_GCM,data:1DfD,iv:I3dK4v/h5nFLNk4yihQxkJiyAir9MLDAQIeGbSn3j+I=,tag:Xu8E6PN7u9YRVnFMWq85DQ==,type:str] + username: ENC[AES256_GCM,data:yF3a6yJbvscUM8HRL9/Df5ZU4j5a3g==,iv:LkZh8eaBZ+Z3+bjpyB3MkWTRpjtk3/bszseT9KCfDmM=,tag:sdAp283HiwYWlVLc7c4waw==,type:str] + password: ENC[AES256_GCM,data:queuYRYekTyynd6fxK4RNImMzQeR7xfNg9u96Fr+1tw=,iv:Rn30tJAoahkMr2ISDbyHClHDdjSF41MqtTwlSGUQELw=,tag:/sfAJXvFwvv3AMxTCONmkg==,type:str] + ssl: ENC[AES256_GCM,data:K2pczQ==,iv:Us4kZfQ2wIx/qJXDaPDuUNvGU2F+U8EtV21SPbTebe8=,tag:lUY9pGQ7dtxIJqOOtIMA8Q==,type:str] sops: kms: [] gcp_kms: [] @@ -34,8 +43,8 @@ sops: NUFIN3NPU2pTZ0NZRXdQY0xhWlI5T3cKd5XCj1aNsD+7+MfiAPGb1iAW9AgzyagG A7cwF9kQwWWLud9z4v6epuDkqGF+7uIy7N/CwBaEgi8+AS8o27wo4g== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-03-23T23:24:16Z" - mac: ENC[AES256_GCM,data:bs8t7nH5BdIz4uQd33M2pt+AVhqfBEJy9l8AFl8p80GLAMg5zKlDWxtVCPrWk8viJvfMkhvwEovBizoy3m7gt8iWLf+dtznBjALtUXVAc/+dmACUS8E9JHHKcvOHxT/cYCuU3t6pDJWlbfnpBtKSSHH8Z/YblYMlkeoNeNOoAwU=,iv:9fKO44c5TNMBgHqcuV6Fu+GW8TjND+32KDEerawpZL4=,tag:Ps8kelq+8iY88mdqugRTMg==,type:str] + lastmodified: "2024-05-08T21:41:24Z" + mac: ENC[AES256_GCM,data:BMM/NP/ls0VdkL1jOqPeEmfxwoQR1Yi5DM2xb1p+Z3u9oo61Tkc2v2G7G9jWMfa2UwVlqYOGIZlwNj2ONhWhDDZBVTd3tTEbssbizNTUWGX7cQBfQm9K0/Mk+qXdug7AfjKnVXZlEbD7QLfqhz7sl/tDaPS9sstnivJENi2sIYI=,iv:nOoc+kiSbf89qJMtGYLURVToh6bCnEjg7zVQivzate4=,tag:ogEOMkRafxKLFX0N9hbOSw==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.8.1 From 457faf8c0c3dfe6f6e337921441cef29fa43b69f Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 10 May 2024 17:28:25 +0100 Subject: [PATCH 02/65] alpine: monerod --- flake.nix | 1 + nixos/services/monero.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 nixos/services/monero.nix diff --git a/flake.nix b/flake.nix index 0a5c5ca..94f6fef 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ ./nixos/services/nextcloud.nix ./nixos/services/ntfy.nix ./nixos/services/authentik.nix + ./nixos/services/monero.nix ] []; vm-sway = diff --git a/nixos/services/monero.nix b/nixos/services/monero.nix new file mode 100644 index 0000000..94cde2b --- /dev/null +++ b/nixos/services/monero.nix @@ -0,0 +1,15 @@ +{...}: { + services.monero = { + enable = true; + rpc = { + address = "0.0.0.0"; + restricted = true; + }; + extraConfig = '' + prune-blockchain=1 + confirm-external-bind=1 + out-peers=64 # This will enable much faster sync and tx awareness; the default 8 is suboptimal nowadays + in-peers=1024 # The default is unlimited; we prefer to put a cap on this + ''; + }; +} From 09c776c9123a75f7badfcfbbd47ca60695c95330 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 12 May 2024 13:54:31 +0100 Subject: [PATCH 03/65] zenix: fix podman module --- flake.nix | 1 - nixos/modules/podman.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 94f6fef..d0a4256 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,6 @@ FCS-Tristan-Nixbook = mkConf [ - # inputs.hyprland.nixosModules.default ./hardware/fcs-tristan-nixbook.nix (auto-login "Hyprland") ./nixos/modules/work.nix diff --git a/nixos/modules/podman.nix b/nixos/modules/podman.nix index 921d4dc..f9cd6a7 100644 --- a/nixos/modules/podman.nix +++ b/nixos/modules/podman.nix @@ -79,6 +79,7 @@ in { options.podman = mkOption { type = types.attrsOf (types.submodule opts); + default = {}; }; config = { systemd.services = lib.mapAttrs mkService config.podman; From aa553249427fc7ccb386fb430c67d6fb012e66f4 Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 17 May 2024 10:01:45 +0100 Subject: [PATCH 04/65] nixbook: update, rm mpd, add emote --- flake.lock | 89 ++++++++++++++------------------------------ home/workstation.nix | 1 - lib/emotes.txt | 1 + 3 files changed, 28 insertions(+), 63 deletions(-) diff --git a/flake.lock b/flake.lock index 1b04b4f..b29aba9 100644 --- a/flake.lock +++ b/flake.lock @@ -18,39 +18,6 @@ "type": "github" } }, - "base16-alacritty": { - "flake": false, - "locked": { - "lastModified": 1703982197, - "narHash": "sha256-TNxKbwdiUXGi4Z4chT72l3mt3GSvOcz6NZsUH8bQU/k=", - "owner": "aarowill", - "repo": "base16-alacritty", - "rev": "c95c200b3af739708455a03b5d185d3d2d263c6e", - "type": "github" - }, - "original": { - "owner": "aarowill", - "repo": "base16-alacritty", - "type": "github" - } - }, - "base16-alacritty-yaml": { - "flake": false, - "locked": { - "lastModified": 1674275109, - "narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=", - "owner": "aarowill", - "repo": "base16-alacritty", - "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", - "type": "github" - }, - "original": { - "owner": "aarowill", - "repo": "base16-alacritty", - "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", - "type": "github" - } - }, "base16-fish": { "flake": false, "locked": { @@ -203,11 +170,11 @@ ] }, "locked": { - "lastModified": 1713166971, - "narHash": "sha256-t0P/rKlsE5l1O3O2LYtAelLzp7PeoPCSzsIietQ1hSM=", + "lastModified": 1715077503, + "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", "owner": "nix-community", "repo": "home-manager", - "rev": "1c43dcfac48a2d622797f7ab741670fdbcf8f609", + "rev": "6e277d9566de9976f47228dd8c580b97488734d4", "type": "github" }, "original": { @@ -225,11 +192,11 @@ ] }, "locked": { - "lastModified": 1706001011, - "narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=", + "lastModified": 1711915616, + "narHash": "sha256-co6LoFA+j6BZEeJNSR8nZ4oOort5qYPskjrDHBaJgmo=", "owner": "nix-community", "repo": "home-manager", - "rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084", + "rev": "820be197ccf3adaad9a8856ef255c13b6cc561a6", "type": "github" }, "original": { @@ -240,11 +207,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "lastModified": 1714906307, + "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", "type": "github" }, "original": { @@ -255,11 +222,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1713042715, - "narHash": "sha256-RifMwYuKu5v6x6O65msKDTqKkQ9crGwOB7yr20qMEuE=", + "lastModified": 1714858427, + "narHash": "sha256-tCxeDP4C1pWe2rYY3IIhdA40Ujz32Ufd4tcrHPSKx2M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c27f3b6d8e29346af16eecc0e9d54b1071eae27e", + "rev": "b980b91038fc4b09067ef97bbe5ad07eecca1e76", "type": "github" }, "original": { @@ -271,11 +238,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1712883908, - "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", + "lastModified": 1714809261, + "narHash": "sha256-hfBmnYFyz9I1mdrC3tX1A+dF9cOUcds5PIMPxrT+cRk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a0c9e3aee1000ac2bfb0e5b98c94c946a5d180a9", + "rev": "d32560238207b8e26d88b265207b216ee46b8450", "type": "github" }, "original": { @@ -287,11 +254,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1700856099, - "narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=", + "lastModified": 1713596654, + "narHash": "sha256-LJbHQQ5aX1LVth2ST+Kkse/DRzgxlVhTL1rxthvyhZc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1", + "rev": "fd16bb6d3bcca96039b11aa52038fafeb6e4f4be", "type": "github" }, "original": { @@ -316,11 +283,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1713174909, - "narHash": "sha256-APoDs2GtzVrsE+Z9w72qpHzEtEDfuinWcNTN7zhwLxg=", + "lastModified": 1715035358, + "narHash": "sha256-RY6kqhpCPa/q3vbqt3iYRyjO3hJz9KZnshMjbpPon8o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "cc535d07cbcdd562bcca418e475c7b1959cefa4b", + "rev": "893e3df091f6838f4f9d71c61ab079d5c5dedbd1", "type": "github" }, "original": { @@ -331,11 +298,11 @@ }, "stable-nixpkgs": { "locked": { - "lastModified": 1713013257, - "narHash": "sha256-ZEfGB3YCBVggvk0BQIqVY7J8XF/9jxQ68fCca6nib+8=", + "lastModified": 1714971268, + "narHash": "sha256-IKwMSwHj9+ec660l+I4tki/1NRoeGpyA2GdtdYpAgEw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "90055d5e616bd943795d38808c94dbf0dd35abe8", + "rev": "27c13997bf450a01219899f5a83bd6ffbfc70d3c", "type": "github" }, "original": { @@ -347,8 +314,6 @@ "stylix": { "inputs": { "base16": "base16", - "base16-alacritty": "base16-alacritty", - "base16-alacritty-yaml": "base16-alacritty-yaml", "base16-fish": "base16-fish", "base16-foot": "base16-foot", "base16-helix": "base16-helix", @@ -361,11 +326,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1713025302, - "narHash": "sha256-za4w2wYt1fg9EdTv5fYLwEqAyHgPmPq88HmlxirXuEk=", + "lastModified": 1715108364, + "narHash": "sha256-6AlOCZCSEpdHEpRQ8pwaGkbfSHVx11+e1+1CMp8+Huc=", "owner": "danth", "repo": "stylix", - "rev": "83866ed8800ed39519a79ea30b18c8eb21f26080", + "rev": "8f7abd2252d0d773ca202cf2c190b47d439f045d", "type": "github" }, "original": { diff --git a/home/workstation.nix b/home/workstation.nix index 9b57960..0aec948 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -8,7 +8,6 @@ ./modules/terminal.nix ./modules/scripts.nix ./modules/email.nix - ./modules/mpd.nix ./modules/menu.nix ./modules/scripts.nix diff --git a/lib/emotes.txt b/lib/emotes.txt index dac74ec..7d30825 100644 --- a/lib/emotes.txt +++ b/lib/emotes.txt @@ -1188,3 +1188,4 @@ 8⃣ keycap: 8 ~ Symbols (keycap) 9⃣ keycap: 9 ~ Symbols (keycap) ¯\_(ツ)_/¯ shrug +• bullet point From 3b5b834899c36b8c248f83cbaa3a7eb2f9fe70ae Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 31 May 2024 12:57:45 +0100 Subject: [PATCH 05/65] nixbook: update, insomnia->bruno --- flake.lock | 62 +++++++++++++++---------------- home/desktop/hyprland/default.nix | 1 - home/programs/graphical.nix | 4 +- home/workstation.nix | 1 - 4 files changed, 33 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index b29aba9..bcceb8a 100644 --- a/flake.lock +++ b/flake.lock @@ -149,16 +149,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1698794309, - "narHash": "sha256-/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=", + "lastModified": 1713702291, + "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "a7c169c6c29cf02a4c392fa0acbbc5f5072823e7", + "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", "type": "github" }, "original": { "owner": "GNOME", - "ref": "45.1", + "ref": "46.1", "repo": "gnome-shell", "type": "github" } @@ -170,11 +170,11 @@ ] }, "locked": { - "lastModified": 1715077503, - "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", + "lastModified": 1717097707, + "narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e277d9566de9976f47228dd8c580b97488734d4", + "rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9", "type": "github" }, "original": { @@ -192,11 +192,11 @@ ] }, "locked": { - "lastModified": 1711915616, - "narHash": "sha256-co6LoFA+j6BZEeJNSR8nZ4oOort5qYPskjrDHBaJgmo=", + "lastModified": 1714981474, + "narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=", "owner": "nix-community", "repo": "home-manager", - "rev": "820be197ccf3adaad9a8856ef255c13b6cc561a6", + "rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f", "type": "github" }, "original": { @@ -207,11 +207,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1714906307, - "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", + "lastModified": 1716948383, + "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", + "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "type": "github" }, "original": { @@ -222,11 +222,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1714858427, - "narHash": "sha256-tCxeDP4C1pWe2rYY3IIhdA40Ujz32Ufd4tcrHPSKx2M=", + "lastModified": 1716655032, + "narHash": "sha256-kQ25DAiCGigsNR/Quxm3v+JGXAEXZ8I7RAF4U94bGzE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b980b91038fc4b09067ef97bbe5ad07eecca1e76", + "rev": "59a450646ec8ee0397f5fa54a08573e8240eb91f", "type": "github" }, "original": { @@ -238,11 +238,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1714809261, - "narHash": "sha256-hfBmnYFyz9I1mdrC3tX1A+dF9cOUcds5PIMPxrT+cRk=", + "lastModified": 1716651315, + "narHash": "sha256-iMgzIeedMqf30TXZ439zW3Yvng1Xm9QTGO+ZwG1IWSw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d32560238207b8e26d88b265207b216ee46b8450", + "rev": "c5187508b11177ef4278edf19616f44f21cc8c69", "type": "github" }, "original": { @@ -254,11 +254,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1713596654, - "narHash": "sha256-LJbHQQ5aX1LVth2ST+Kkse/DRzgxlVhTL1rxthvyhZc=", + "lastModified": 1714912032, + "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fd16bb6d3bcca96039b11aa52038fafeb6e4f4be", + "rev": "ee4a6e0f566fe5ec79968c57a9c2c3c25f2cf41d", "type": "github" }, "original": { @@ -283,11 +283,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1715035358, - "narHash": "sha256-RY6kqhpCPa/q3vbqt3iYRyjO3hJz9KZnshMjbpPon8o=", + "lastModified": 1716692524, + "narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "893e3df091f6838f4f9d71c61ab079d5c5dedbd1", + "rev": "962797a8d7f15ed7033031731d0bb77244839960", "type": "github" }, "original": { @@ -298,11 +298,11 @@ }, "stable-nixpkgs": { "locked": { - "lastModified": 1714971268, - "narHash": "sha256-IKwMSwHj9+ec660l+I4tki/1NRoeGpyA2GdtdYpAgEw=", + "lastModified": 1716991068, + "narHash": "sha256-Av0UWCCiIGJxsZ6TFc+OiKCJNqwoxMNVYDBChmhjNpo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27c13997bf450a01219899f5a83bd6ffbfc70d3c", + "rev": "25cf937a30bf0801447f6bf544fc7486c6309234", "type": "github" }, "original": { @@ -326,11 +326,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1715108364, - "narHash": "sha256-6AlOCZCSEpdHEpRQ8pwaGkbfSHVx11+e1+1CMp8+Huc=", + "lastModified": 1716895458, + "narHash": "sha256-W9Y/+K4L7JcF5xcXO4MVGQk/0DgzHrp/IjlHyLeYExY=", "owner": "danth", "repo": "stylix", - "rev": "8f7abd2252d0d773ca202cf2c190b47d439f045d", + "rev": "5234b3d467aa803ad8d3fe898ef5673246045984", "type": "github" }, "original": { diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 9402090..d17969c 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -35,7 +35,6 @@ in { }; gestures = { workspace_swipe = true; - workspace_swipe_numbered = false; }; decoration = { rounding = 0; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index ccddb6a..3c3823e 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -23,8 +23,8 @@ libsForQt5.okular gimp libreoffice - dbeaver - insomnia + dbeaver-bin + bruno drawio # entertainment diff --git a/home/workstation.nix b/home/workstation.nix index 0aec948..0a6c574 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -22,7 +22,6 @@ dmenuCommand = "${pkgs.tofi}/bin/tofi --fuzzy-match true"; drunCommand = "${pkgs.tofi}/bin/tofi-drun --drun-launch true"; }; - roles.mpd.enable = true; home.packages = with pkgs; [ wl-clipboard From c98d05bc0a6e6a38e879d4300816e5a715818eba Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 31 May 2024 13:53:41 +0100 Subject: [PATCH 06/65] nixbook: fix hyprland screen sharing again --- home/desktop/hyprland/default.nix | 7 +++++-- nixos/workstation.nix | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index d17969c..21eb2f9 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -16,12 +16,15 @@ in { xdg.portal = { enable = true; configPackages = [pkgs.hyprland]; - extraPortals = [pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk]; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; wayland.windowManager.hyprland = { enable = true; - systemd.enable = true; + systemd = { + enable = true; + variables = ["--all"]; + }; settings = { exec-once = ["${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill"]; input = { diff --git a/nixos/workstation.nix b/nixos/workstation.nix index 07d2d6e..fe841b8 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -10,6 +10,10 @@ "electron-25.9.0" ]; + programs.hyprland = { + enable = true; + }; + # use pipewire hardware.pulseaudio.enable = false; security.rtkit.enable = true; From 8431dbc175c3b08884a8f7c2dc8bb6b7fd9919cb Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 9 Jul 2024 17:26:14 +0100 Subject: [PATCH 07/65] zenix: proton-ge, pinentry-qt --- home/workstation.nix | 2 +- nixos/programs/gamer.nix | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/home/workstation.nix b/home/workstation.nix index 0a6c574..8d0da1a 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -34,7 +34,7 @@ notify = true; }; - programs.rbw.settings.pinentry = pkgs.pinentry-gnome3; + programs.rbw.settings.pinentry = pkgs.pinentry-qt; home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ"; home.file.".config/pipewire/pipewire.conf.d/raop-discover.conf".text = '' diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index 5f941eb..67cc40e 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -1,4 +1,4 @@ -{lib, ...}: { +{lib, pkgs, ...}: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "steam" @@ -6,9 +6,12 @@ "steam-original" "osu-lazer" ]; - programs.steam = { enable = true; + extest.enable = true; + extraCompatPackages = with pkgs; [ + proton-ge-bin + ]; remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; }; From 7ff460508b376f99c876b01e5785dbf0ba1956af Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 9 Jul 2024 17:34:29 +0100 Subject: [PATCH 08/65] nixbook: update, add cosmic vm --- flake.lock | 167 ++++++++++++++++++++++--------- flake.nix | 14 +++ hardware/fcs-tristan-nixbook.nix | 2 +- home/programs/work.nix | 1 + lib/cypress.nix | 16 +++ nixos/modules/work.nix | 10 ++ nixos/workstation.nix | 7 +- 7 files changed, 165 insertions(+), 52 deletions(-) create mode 100644 lib/cypress.nix diff --git a/flake.lock b/flake.lock index bcceb8a..f14db77 100644 --- a/flake.lock +++ b/flake.lock @@ -101,20 +101,36 @@ "base16-vim": { "flake": false, "locked": { - "lastModified": 1663659192, - "narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=", - "owner": "chriskempson", + "lastModified": 1716150083, + "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "owner": "tinted-theming", "repo": "base16-vim", - "rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d", + "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", "type": "github" }, "original": { - "owner": "chriskempson", + "owner": "tinted-theming", "repo": "base16-vim", "type": "github" } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1717312683, + "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1673956053, @@ -170,11 +186,11 @@ ] }, "locked": { - "lastModified": 1717097707, - "narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=", + "lastModified": 1720327769, + "narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=", "owner": "nix-community", "repo": "home-manager", - "rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9", + "rev": "6b7ce96f34b324e4e104abc30d06955d216bac71", "type": "github" }, "original": { @@ -192,11 +208,11 @@ ] }, "locked": { - "lastModified": 1714981474, - "narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=", + "lastModified": 1715930644, + "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", "owner": "nix-community", "repo": "home-manager", - "rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f", + "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", "type": "github" }, "original": { @@ -205,13 +221,81 @@ "type": "github" } }, + "nixos-cosmic": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1720402578, + "narHash": "sha256-Zw+4iAKfIaSu0x8HZeQzC8r8Gktz8+HdZSdVdZ8buqs=", + "owner": "lilyinstarlight", + "repo": "nixos-cosmic", + "rev": "bbd44e1198e9a998af04b6973d3f3a2c9950ae46", + "type": "github" + }, + "original": { + "owner": "lilyinstarlight", + "repo": "nixos-cosmic", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1720244366, + "narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1720282526, + "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { @@ -220,29 +304,13 @@ "type": "indirect" } }, - "nixpkgs-stable": { + "nixpkgs_3": { "locked": { - "lastModified": 1716655032, - "narHash": "sha256-kQ25DAiCGigsNR/Quxm3v+JGXAEXZ8I7RAF4U94bGzE=", + "lastModified": 1720181791, + "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "59a450646ec8ee0397f5fa54a08573e8240eb91f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1716651315, - "narHash": "sha256-iMgzIeedMqf30TXZ439zW3Yvng1Xm9QTGO+ZwG1IWSw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c5187508b11177ef4278edf19616f44f21cc8c69", + "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", "type": "github" }, "original": { @@ -252,7 +320,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1714912032, "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", @@ -271,7 +339,8 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "nixos-cosmic": "nixos-cosmic", + "nixpkgs": "nixpkgs_2", "sops-nix": "sops-nix", "stable-nixpkgs": "stable-nixpkgs", "stylix": "stylix" @@ -279,15 +348,15 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs": "nixpkgs_3", + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1716692524, - "narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=", + "lastModified": 1720321395, + "narHash": "sha256-kcI8q9Nh8/CSj0ygfWq1DLckHl8IHhFarL8ie6g7OEk=", "owner": "Mic92", "repo": "sops-nix", - "rev": "962797a8d7f15ed7033031731d0bb77244839960", + "rev": "c184aca4db5d71c3db0c8cbfcaaec337a5d065ea", "type": "github" }, "original": { @@ -298,11 +367,11 @@ }, "stable-nixpkgs": { "locked": { - "lastModified": 1716991068, - "narHash": "sha256-Av0UWCCiIGJxsZ6TFc+OiKCJNqwoxMNVYDBChmhjNpo=", + "lastModified": 1719957072, + "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "25cf937a30bf0801447f6bf544fc7486c6309234", + "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", "type": "github" }, "original": { @@ -320,17 +389,17 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1716895458, - "narHash": "sha256-W9Y/+K4L7JcF5xcXO4MVGQk/0DgzHrp/IjlHyLeYExY=", + "lastModified": 1719525570, + "narHash": "sha256-xSO/H67GAHEW0siD2PHoO/e97MbROL3r3s5SpF6A6Dc=", "owner": "danth", "repo": "stylix", - "rev": "5234b3d467aa803ad8d3fe898ef5673246045984", + "rev": "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d0a4256..492787f 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ }; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; + nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; }; outputs = inputs: let @@ -87,6 +88,19 @@ ./home/workstation.nix ]; + vm-cosmic = + mkConf + [ + ./hardware/vm.nix + ./nixos/workstation.nix + { + services.desktopManager.cosmic.enable = true; + services.displayManager.cosmic-greeter.enable = true; + } + ] [ + ./home/workstation.nix + ]; + vm-hyprland = builtins.trace '' use super+enter to start a terminal. diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index a6f26f9..e22cc1a 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -66,7 +66,7 @@ in { powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - hardware.opengl = { + hardware.graphics = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD diff --git a/home/programs/work.nix b/home/programs/work.nix index 0f742ab..736dbe5 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -18,6 +18,7 @@ in { home.packages = with pkgs; [ thunderbird remmina + devcontainer (import ../../lib/mkapp.nix "slack" { inherit pkgs; desktopName = "Slack"; diff --git a/lib/cypress.nix b/lib/cypress.nix new file mode 100644 index 0000000..775b7f6 --- /dev/null +++ b/lib/cypress.nix @@ -0,0 +1,16 @@ +final: prev: { + cypress = prev.cypress.overrideAttrs (oldAttrs: rec { + pname = "cypress"; + version = "13.8.0"; + + src = prev.fetchzip { + url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip"; + # sha256 = "sha256-cLjvISkA8UM2OU3ANYbrXD/pHE0iu69z+Ehh5N0jGxY="; + sha256 = "sha256-9SSUbEZtyhl14FOcQwj2x/Utf1YuGtzt8hfLNaN3hvs="; + ## Note: sha256 is computed via (note the version): + ## + ## nix-prefetch-url --unpack https://cdn.cypress.io/desktop/12.1.0/linux-x64/cypress.zip + }; + }); +} + diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index 4c533b0..15fb5ec 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -19,6 +19,16 @@ in { }; }; + # breaks some work projects ):< + networking.stevenblack.enable = false; + + nixpkgs.overlays = [ (import ../../lib/cypress.nix) ]; + + environment.variables = { + CYPRESS_INSTALL_BINARY=0; + CYPRESS_RUN_BINARY="${pkgs.cypress}/bin/Cypress"; + }; + services.onedrive.enable = true; users.users.${user}.extraGroups = ["docker"]; diff --git a/nixos/workstation.nix b/nixos/workstation.nix index fe841b8..a62914e 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -1,13 +1,15 @@ { inputs, pkgs, + lib, ... }: { imports = [ inputs.stylix.nixosModules.stylix + inputs.nixos-cosmic.nixosModules.default ]; nixpkgs.config.permittedInsecurePackages = [ - "electron-25.9.0" + "electron-27.3.11" ]; programs.hyprland = { @@ -63,11 +65,12 @@ virtualisation.waydroid.enable = true; networking.stevenblack = { - enable = true; + enable = lib.mkDefault true; block = ["porn" "gambling"]; }; stylix = { + enable = true; image = ../images/nix-soft.png; base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml"; opacity = { From 5dbe3f07a73984283874dc05c8058ef5185e23ca Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 23 Jul 2024 15:42:32 +0100 Subject: [PATCH 09/65] nixbook: update cypress to correct version --- home/programs/work.nix | 5 +++++ lib/cypress.nix | 7 +++---- nixos/modules/work.nix | 5 ----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/home/programs/work.nix b/home/programs/work.nix index 736dbe5..34c1511 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -33,6 +33,11 @@ in { }) ]; + home.sessionVariables = { + CYPRESS_INSTALL_BINARY=0; + CYPRESS_RUN_BINARY="${pkgs.cypress}/bin/Cypress"; + }; + gtk.gtk3.bookmarks = [ "file:///home/tristan/OneDrive/ OneDrive" ]; diff --git a/lib/cypress.nix b/lib/cypress.nix index 775b7f6..e1642ec 100644 --- a/lib/cypress.nix +++ b/lib/cypress.nix @@ -1,15 +1,14 @@ final: prev: { cypress = prev.cypress.overrideAttrs (oldAttrs: rec { pname = "cypress"; - version = "13.8.0"; + version = "13.13.0"; src = prev.fetchzip { url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip"; - # sha256 = "sha256-cLjvISkA8UM2OU3ANYbrXD/pHE0iu69z+Ehh5N0jGxY="; - sha256 = "sha256-9SSUbEZtyhl14FOcQwj2x/Utf1YuGtzt8hfLNaN3hvs="; + sha256 = "sha256-FGaopXp8T0swY0v6IH7cuhp/IolTmJ8vXLLslPtBOJw="; ## Note: sha256 is computed via (note the version): ## - ## nix-prefetch-url --unpack https://cdn.cypress.io/desktop/12.1.0/linux-x64/cypress.zip + ## nix-prefetch-url --unpack https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip }; }); } diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index 15fb5ec..5360281 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -24,11 +24,6 @@ in { nixpkgs.overlays = [ (import ../../lib/cypress.nix) ]; - environment.variables = { - CYPRESS_INSTALL_BINARY=0; - CYPRESS_RUN_BINARY="${pkgs.cypress}/bin/Cypress"; - }; - services.onedrive.enable = true; users.users.${user}.extraGroups = ["docker"]; From 9903d1949e1cdc451a416bd6f58fb46961b36c00 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 23 Jul 2024 15:47:52 +0100 Subject: [PATCH 10/65] nixbook: add prefetch script --- home/programs/scripts.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/home/programs/scripts.nix b/home/programs/scripts.nix index e273227..39eabef 100644 --- a/home/programs/scripts.nix +++ b/home/programs/scripts.nix @@ -344,5 +344,12 @@ in { } ]; } + { + name = "prefetch-url"; + text = '' + nix-build -E "with import {}; fetchzip {url = \"$1\"; sha256 = lib.fakeSha256; }" + ''; + install = true; + } ]; } From c36d393ed55a892a94bca5fe6bc4b2b789cc53a6 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 25 Jul 2024 20:00:22 +0100 Subject: [PATCH 11/65] zenix: use nheko, move cosmic stuff --- flake.lock | 34 +++++++++------------------------- flake.nix | 10 ++++------ hardware/vm.nix | 2 +- home/default.nix | 2 +- home/programs/graphical.nix | 2 +- home/workstation.nix | 2 +- nixos/programs/cosmic.nix | 11 +++++++++++ nixos/workstation.nix | 10 ++++------ 8 files changed, 32 insertions(+), 41 deletions(-) create mode 100644 nixos/programs/cosmic.nix diff --git a/flake.lock b/flake.lock index f14db77..66feb3f 100644 --- a/flake.lock +++ b/flake.lock @@ -228,11 +228,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1720402578, - "narHash": "sha256-Zw+4iAKfIaSu0x8HZeQzC8r8Gktz8+HdZSdVdZ8buqs=", + "lastModified": 1720834574, + "narHash": "sha256-VBJLs1yX4CsG3mr5nPjm6Z7NBStyJlGRNdmr2IoWU70=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "bbd44e1198e9a998af04b6973d3f3a2c9950ae46", + "rev": "733919b05babc978b0c015987a6c4de499ff27cc", "type": "github" }, "original": { @@ -243,11 +243,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720031269, - "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "lastModified": 1720542800, + "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "rev": "feb2849fdeb70028c70d73b848214b00d324a497", "type": "github" }, "original": { @@ -259,11 +259,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1720244366, - "narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=", + "lastModified": 1720691131, + "narHash": "sha256-CWT+KN8aTPyMIx8P303gsVxUnkinIz0a/Cmasz1jyIM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", + "rev": "a046c1202e11b62cbede5385ba64908feb7bfac4", "type": "github" }, "original": { @@ -342,7 +342,6 @@ "nixos-cosmic": "nixos-cosmic", "nixpkgs": "nixpkgs_2", "sops-nix": "sops-nix", - "stable-nixpkgs": "stable-nixpkgs", "stylix": "stylix" } }, @@ -365,21 +364,6 @@ "type": "github" } }, - "stable-nixpkgs": { - "locked": { - "lastModified": 1719957072, - "narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7144d6241f02d171d25fba3edeaf15e0f2592105", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", - "type": "indirect" - } - }, "stylix": { "inputs": { "base16": "base16", diff --git a/flake.nix b/flake.nix index 492787f..fe18f81 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,15 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; - stable-nixpkgs.url = "nixpkgs/nixos-23.11"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; - nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; + nixos-cosmic = { + url = "github:lilyinstarlight/nixos-cosmic"; + }; }; outputs = inputs: let @@ -93,10 +94,7 @@ [ ./hardware/vm.nix ./nixos/workstation.nix - { - services.desktopManager.cosmic.enable = true; - services.displayManager.cosmic-greeter.enable = true; - } + ./nixos/programs/cosmic.nix ] [ ./home/workstation.nix ]; diff --git a/hardware/vm.nix b/hardware/vm.nix index f71fc8c..878ef4e 100644 --- a/hardware/vm.nix +++ b/hardware/vm.nix @@ -1,7 +1,7 @@ {config, ...}: let user = config.user; in { - hardware.opengl.enable = true; + hardware.graphics.enable = true; boot.kernelModules = ["kvm-amd" "qxl" "bochs_drm"]; system.stateVersion = "24.05"; diff --git a/home/default.nix b/home/default.nix index 2f4091e..c75a258 100644 --- a/home/default.nix +++ b/home/default.nix @@ -35,7 +35,7 @@ libsixel yt-dlp ytfzf - neofetch + fastfetch tree ansible ]; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 3c3823e..a10397a 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -32,7 +32,7 @@ shortwave # other - element-desktop + nheko brave vieb bitwarden diff --git a/home/workstation.nix b/home/workstation.nix index 8d0da1a..0a6c574 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -34,7 +34,7 @@ notify = true; }; - programs.rbw.settings.pinentry = pkgs.pinentry-qt; + programs.rbw.settings.pinentry = pkgs.pinentry-gnome3; home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ"; home.file.".config/pipewire/pipewire.conf.d/raop-discover.conf".text = '' diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix new file mode 100644 index 0000000..6372038 --- /dev/null +++ b/nixos/programs/cosmic.nix @@ -0,0 +1,11 @@ +{inputs, ...}: { + imports = [ + inputs.nixos-cosmic.nixosModules.default + ]; + nix.settings = { + substituters = [ "https://cosmic.cachix.org/" ]; + trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ]; + }; + services.desktopManager.cosmic.enable = true; + services.displayManager.cosmic-greeter.enable = true; +} diff --git a/nixos/workstation.nix b/nixos/workstation.nix index a62914e..cf8ef14 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -6,16 +6,11 @@ }: { imports = [ inputs.stylix.nixosModules.stylix - inputs.nixos-cosmic.nixosModules.default ]; nixpkgs.config.permittedInsecurePackages = [ "electron-27.3.11" ]; - programs.hyprland = { - enable = true; - }; - # use pipewire hardware.pulseaudio.enable = false; security.rtkit.enable = true; @@ -53,7 +48,10 @@ services.printing.enable = true; - services.dbus.enable = true; + services.dbus = { + enable = true; + packages = [pkgs.gcr]; + }; programs.light.enable = true; programs.dconf.enable = true; From 8ee6da98126d9b139ea09be2ff66d35ea87d30e5 Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 29 Jul 2024 16:16:52 +0100 Subject: [PATCH 12/65] zenix: update --- flake.lock | 86 +++++++++++++++++++++++------------------------------- flake.nix | 2 +- 2 files changed, 37 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index 66feb3f..b4aa8e0 100644 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1696727917, - "narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=", + "lastModified": 1720809814, + "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb", + "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", "type": "github" }, "original": { @@ -186,11 +186,11 @@ ] }, "locked": { - "lastModified": 1720327769, - "narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=", + "lastModified": 1722067813, + "narHash": "sha256-nxpzoKXwn+8RsxpxwD86mtEscOMw64ZD/vGSNWzGMlA=", "owner": "nix-community", "repo": "home-manager", - "rev": "6b7ce96f34b324e4e104abc30d06955d216bac71", + "rev": "975b83ca560d17db51a66cb2b0dc0e44213eab27", "type": "github" }, "original": { @@ -224,15 +224,17 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs" + ], "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1720834574, - "narHash": "sha256-VBJLs1yX4CsG3mr5nPjm6Z7NBStyJlGRNdmr2IoWU70=", + "lastModified": 1721160462, + "narHash": "sha256-/VxDWswjySr3CUuMRP4OBBP3sFSps7r1Bh/AJkZSdVk=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "733919b05babc978b0c015987a6c4de499ff27cc", + "rev": "b2d62f3b793495c1156cba6a99512cd95ac2c439", "type": "github" }, "original": { @@ -243,27 +245,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720542800, - "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", + "lastModified": 1721924956, + "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "feb2849fdeb70028c70d73b848214b00d324a497", + "rev": "5ad6a14c6bf098e98800b091668718c336effc95", "type": "github" }, "original": { - "owner": "NixOS", + "id": "nixpkgs", "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "indirect" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1720691131, - "narHash": "sha256-CWT+KN8aTPyMIx8P303gsVxUnkinIz0a/Cmasz1jyIM=", + "lastModified": 1720954236, + "narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a046c1202e11b62cbede5385ba64908feb7bfac4", + "rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27", "type": "github" }, "original": { @@ -275,11 +276,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1720282526, - "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=", + "lastModified": 1721524707, + "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927", + "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", "type": "github" }, "original": { @@ -291,26 +292,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1720031269, - "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "lastModified": 1721466660, + "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1720181791, - "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", + "rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100", "type": "github" }, "original": { @@ -320,7 +306,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1714912032, "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", @@ -340,22 +326,22 @@ "inputs": { "home-manager": "home-manager", "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "sops-nix": "sops-nix", "stylix": "stylix" } }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1720321395, - "narHash": "sha256-kcI8q9Nh8/CSj0ygfWq1DLckHl8IHhFarL8ie6g7OEk=", + "lastModified": 1721688883, + "narHash": "sha256-9jsjsRKtJRqNSTXKj9zuDFRf2PGix30nMx9VKyPgD2U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c184aca4db5d71c3db0c8cbfcaaec337a5d065ea", + "rev": "aff2f88277dabe695de4773682842c34a0b7fd54", "type": "github" }, "original": { @@ -376,14 +362,14 @@ "flake-compat": "flake-compat_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1719525570, - "narHash": "sha256-xSO/H67GAHEW0siD2PHoO/e97MbROL3r3s5SpF6A6Dc=", + "lastModified": 1721989207, + "narHash": "sha256-APKQeMMdh1O1W3OnxEvNfHNBiE4eRvEN6rosFr2dLHE=", "owner": "danth", "repo": "stylix", - "rev": "1ff9d37d27377bfe8994c24a8d6c6c1734ffa116", + "rev": "b9de20c76e8d5c13cf2304d23cf589803c311670", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fe18f81..87fd1d2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,5 @@ { description = "A flake using my config"; - inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; home-manager = { @@ -11,6 +10,7 @@ sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { url = "github:lilyinstarlight/nixos-cosmic"; + inputs.nixpkgs.follows = "nixpkgs"; }; }; From ce02fb7bee19cf4f1779ad9e34d710241764c5a3 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 30 Jul 2024 02:23:39 +0100 Subject: [PATCH 13/65] zenix: add hypridle and hyprlock, and format --- home/desktop/hyprland/default.nix | 70 +++++++++++++++++++++++++++++-- home/desktop/utils/swayidle.nix | 2 +- home/programs/graphical.nix | 1 + home/programs/scripts.nix | 4 +- home/programs/work.nix | 4 +- lib/cypress.nix | 1 - nixos/modules/podman.nix | 8 ++-- nixos/modules/work.nix | 2 +- nixos/programs/cosmic.nix | 4 +- nixos/programs/gamer.nix | 6 ++- nixos/workstation.nix | 1 + 11 files changed, 86 insertions(+), 17 deletions(-) diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 21eb2f9..0c377f0 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -6,10 +6,17 @@ }: let modifier = config.windowManager.modifierKey; menu = config.programs.menu.dmenuCommand; + lock_cmd = "${config.programs.hyprlock.package}/bin/hyprlock"; + color = { + inherit (config.lib.stylix.colors) yellow red; + bg = config.lib.stylix.colors.base00; + fg = config.lib.stylix.colors.base07; + text = config.lib.stylix.colors.base05; + }; + rgb = color: "rgb(${color})"; + in { imports = [ - (import ../utils/swaylock.nix) - (import ../utils/swayidle.nix) (import ../utils/waybar.nix) (import ../utils/display.nix) ]; @@ -19,6 +26,64 @@ in { extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; + services.hypridle = { + enable = true; + settings = { + general = { + before_sleep_cmd = "rbw lock"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}"; + }; + + listener = [ + { + timeout = 300; + on-timeout = "loginctl lock-session"; + } + { + timeout = 1200; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + programs.hyprlock = { + enable = true; + settings = { + # https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/ + general = { + disable_loading_bar = true; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + dots_center = true; + fade_on_empty = true; + outline_thickness = 5; + shadow_passes = 2; + inner_color = rgb color.bg; + outer_color = rgb color.fg; + font_color = rgb color.text; + fail_color = rgb color.red; + check_color = rgb color.yellow; + } + ]; + }; + }; + wayland.windowManager.hyprland = { enable = true; systemd = { @@ -26,7 +91,6 @@ in { variables = ["--all"]; }; settings = { - exec-once = ["${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill"]; input = { touchpad = { natural_scroll = true; diff --git a/home/desktop/utils/swayidle.nix b/home/desktop/utils/swayidle.nix index ee99499..f9d2bd4 100644 --- a/home/desktop/utils/swayidle.nix +++ b/home/desktop/utils/swayidle.nix @@ -15,7 +15,7 @@ timeouts = [ { timeout = 300; - command = "${pkgs.swaylock-effects}/bin/swaylock -f"; + command = "loginctl lock-session"; } { timeout = 600; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index a10397a..342376f 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -33,6 +33,7 @@ # other nheko + cinny-desktop brave vieb bitwarden diff --git a/home/programs/scripts.nix b/home/programs/scripts.nix index 39eabef..b4d8293 100644 --- a/home/programs/scripts.nix +++ b/home/programs/scripts.nix @@ -12,7 +12,6 @@ grim = "${pkgs.grim}/bin/grim"; slurp = "${pkgs.slurp}/bin/slurp"; amixer = "${pkgs.alsa-utils}/bin/amixer"; - swaybg = "${pkgs.swaybg}/bin/swaybg"; chafa = "${pkgs.chafa}/bin/chafa"; exiftool = "${pkgs.exiftool}/bin/exiftool"; wc = "${pkgs.coreutils}/bin/wc"; @@ -25,6 +24,7 @@ gawk = "${pkgs.gawk}/bin/awk"; hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker"; sed = "${pkgs.gnused}/bin/sed"; + lock = "${pkgs.hyprlock}/bin/hyprlock"; }; in { programs.scripts = [ @@ -279,7 +279,7 @@ in { sleep hibernate" | ${my-deps.menu}) case $res in - lock) swaylock;; + lock) ${my-deps.lock};; sleep) systemctl suspend;; hibernate) systemctl hibernate;; esac diff --git a/home/programs/work.nix b/home/programs/work.nix index 34c1511..491fe5c 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -34,8 +34,8 @@ in { ]; home.sessionVariables = { - CYPRESS_INSTALL_BINARY=0; - CYPRESS_RUN_BINARY="${pkgs.cypress}/bin/Cypress"; + CYPRESS_INSTALL_BINARY = 0; + CYPRESS_RUN_BINARY = "${pkgs.cypress}/bin/Cypress"; }; gtk.gtk3.bookmarks = [ diff --git a/lib/cypress.nix b/lib/cypress.nix index e1642ec..e735b87 100644 --- a/lib/cypress.nix +++ b/lib/cypress.nix @@ -12,4 +12,3 @@ final: prev: { }; }); } - diff --git a/nixos/modules/podman.nix b/nixos/modules/podman.nix index f9cd6a7..c6cda54 100644 --- a/nixos/modules/podman.nix +++ b/nixos/modules/podman.nix @@ -19,10 +19,10 @@ ${toString (builtins.map (mapping: "-p ${mapping}") ports)} \ ${toString (builtins.map (mapping: "-v ${mapping}") volumes)} \ ${ - if builtins.isNull envFile - then "" - else "--env-file ${toString envFile}" - } \ + if builtins.isNull envFile + then "" + else "--env-file ${toString envFile}" + } \ --detach --replace \ --name ${name} \ ${image} ${command} diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index 5360281..bb94cf9 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -22,7 +22,7 @@ in { # breaks some work projects ):< networking.stevenblack.enable = false; - nixpkgs.overlays = [ (import ../../lib/cypress.nix) ]; + nixpkgs.overlays = [(import ../../lib/cypress.nix)]; services.onedrive.enable = true; diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix index 6372038..f343d5c 100644 --- a/nixos/programs/cosmic.nix +++ b/nixos/programs/cosmic.nix @@ -3,8 +3,8 @@ inputs.nixos-cosmic.nixosModules.default ]; nix.settings = { - substituters = [ "https://cosmic.cachix.org/" ]; - trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ]; + substituters = ["https://cosmic.cachix.org/"]; + trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; }; services.desktopManager.cosmic.enable = true; services.displayManager.cosmic-greeter.enable = true; diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index 67cc40e..b676f2e 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -1,4 +1,8 @@ -{lib, pkgs, ...}: { +{ + lib, + pkgs, + ... +}: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "steam" diff --git a/nixos/workstation.nix b/nixos/workstation.nix index cf8ef14..2d9e181 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -27,6 +27,7 @@ networking.firewall.allowedTCPPorts = [4713]; security.pam.services.swaylock = {}; + security.pam.services.hyprlock = {}; security.polkit.enable = true; systemd.user.services.polkit-gnome-authentication-agent-1 = { description = "polkit-gnome-authentication-agent-1"; From 186851163199eb0f6c89663471d86197d23c7cc2 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 30 Jul 2024 20:50:42 +0100 Subject: [PATCH 14/65] zenix: hyprlock tweaks --- home/desktop/hyprland/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 0c377f0..0471c1c 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -55,9 +55,9 @@ in { settings = { # https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/ general = { - disable_loading_bar = true; hide_cursor = true; - no_fade_in = false; + grace = 10; + ignore_empty_input = true; }; background = [ From 88ce520e299c86ba46430a695727d250bd2d1504 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 30 Jul 2024 13:29:13 +0100 Subject: [PATCH 15/65] nixbook: nixvim nixbook: add more nixvim plugins --- flake.lock | 259 ++++++++++++++++++++++++++++- flake.nix | 135 +++++++++------ home/desktop/hyprland/default.nix | 1 - home/programs/neovim/config.lua | 30 ---- home/programs/neovim/default.nix | 57 +------ home/programs/neovim/lspconfig.lua | 54 ------ lib/mkconf.nix | 11 +- lib/nixvim.nix | 106 ++++++++++++ nixos/default.nix | 10 ++ 9 files changed, 470 insertions(+), 193 deletions(-) delete mode 100644 home/programs/neovim/config.lua delete mode 100644 home/programs/neovim/lspconfig.lua create mode 100644 lib/nixvim.nix diff --git a/flake.lock b/flake.lock index b4aa8e0..8c38799 100644 --- a/flake.lock +++ b/flake.lock @@ -114,6 +114,27 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "owner": "numtide", + "repo": "devshell", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -131,6 +152,20 @@ } }, "flake-compat_2": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1673956053, @@ -146,6 +181,45 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -162,6 +236,58 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721042469, + "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -201,6 +327,27 @@ } }, "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722119539, + "narHash": "sha256-2kU90liMle0vKR8exJx1XM4hZh9CdNgZGHCTbeA9yzY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d0240a064db3987eb4d5204cf2400bc4452d9922", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { "inputs": { "nixpkgs": [ "stylix", @@ -221,6 +368,27 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722082646, + "narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", @@ -322,11 +490,62 @@ "type": "github" } }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1722248209, + "narHash": "sha256-yYoxx5hVrI7JaiPy44sgnr5YIRXWY7ttNoN/l5fJOgI=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "2089eb407d8c5dbd6ca6e93d4988a439ca6446fd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722144272, + "narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", + "owner": "NuschtOS", + "repo": "search", + "rev": "16565307c267ec219c2b5d3494ba66df08e7d403", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nixos-cosmic": "nixos-cosmic", "nixpkgs": "nixpkgs", + "nixvim": "nixvim", "sops-nix": "sops-nix", "stylix": "stylix" } @@ -359,9 +578,9 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -377,6 +596,42 @@ "repo": "stylix", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721769617, + "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 87fd1d2..976798f 100644 --- a/flake.nix +++ b/flake.nix @@ -12,9 +12,13 @@ url = "github:lilyinstarlight/nixos-cosmic"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs: let + outputs = {nixvim, ...} @ inputs: let system = "x86_64-linux"; pkgs = import inputs.nixpkgs {inherit system;}; user = "tristan"; @@ -25,14 +29,15 @@ in { formatter.${system} = pkgs.alejandra; nixosConfigurations = { - zenix = - mkConf [ + zenix = mkConf { + nixos-modules = [ ./hardware/zenix.nix (auto-login "Hyprland") ./nixos/programs/gamer.nix ./nixos/programs/personal.nix ./nixos/workstation.nix - ] [ + ]; + home-modules = [ ./home/workstation.nix ./home/desktop/hyprland/. ./home/programs/graphical.nix @@ -40,37 +45,42 @@ ./home/programs/personal/. ./home/programs/xr.nix ]; + }; - FCS-Tristan-Nixbook = - mkConf [ + FCS-Tristan-Nixbook = mkConf { + nixos-modules = [ ./hardware/fcs-tristan-nixbook.nix (auto-login "Hyprland") ./nixos/modules/work.nix ./nixos/workstation.nix - ] [ + ]; + home-modules = [ ./home/workstation.nix ./home/desktop/hyprland/. ./home/programs/work.nix ./home/programs/graphical.nix ]; + }; - alpine = mkConf [ - ./hardware/alpine.nix - ./nixos/services/anki.nix - ./nixos/services/forgejo.nix - ./nixos/services/vaultwarden.nix - ./nixos/services/jellyfin.nix - ./nixos/services/mpd.nix - ./nixos/services/prometheus.nix - ./nixos/services/grafana.nix - ./nixos/services/synapse.nix - ./nixos/services/mautrix/whatsapp.nix - ./nixos/services/mautrix/signal.nix - ./nixos/services/nextcloud.nix - ./nixos/services/ntfy.nix - ./nixos/services/authentik.nix - ./nixos/services/monero.nix - ] []; + alpine = mkConf { + nixos-modules = [ + ./hardware/alpine.nix + ./nixos/services/anki.nix + ./nixos/services/forgejo.nix + ./nixos/services/vaultwarden.nix + ./nixos/services/jellyfin.nix + ./nixos/services/mpd.nix + ./nixos/services/prometheus.nix + ./nixos/services/grafana.nix + ./nixos/services/synapse.nix + ./nixos/services/mautrix/whatsapp.nix + ./nixos/services/mautrix/signal.nix + ./nixos/services/nextcloud.nix + ./nixos/services/ntfy.nix + ./nixos/services/authentik.nix + ./nixos/services/monero.nix + ]; + }; vm-sway = builtins.trace '' @@ -80,24 +90,30 @@ start the vm with '-vga qxl' or '-vga virtio' '' mkConf - [ - ./hardware/vm.nix - (auto-login "sway") - ./nixos/workstation.nix - ] [ - ./home/desktop/sway/. - ./home/workstation.nix - ]; + { + nixos-modules = [ + ./hardware/vm.nix + (auto-login "sway") + ./nixos/workstation.nix + ]; + home-modules = [ + ./home/desktop/sway/. + ./home/workstation.nix + ]; + }; vm-cosmic = mkConf - [ - ./hardware/vm.nix - ./nixos/workstation.nix - ./nixos/programs/cosmic.nix - ] [ - ./home/workstation.nix - ]; + { + nixos-modules = [ + ./hardware/vm.nix + ./nixos/workstation.nix + ./nixos/programs/cosmic.nix + ]; + home-modules = [ + ./home/workstation.nix + ]; + }; vm-hyprland = builtins.trace '' @@ -109,18 +125,37 @@ start with '-vga virtio' '' mkConf - [ - ./hardware/vm.nix - (auto-login "Hyprland") - ./nixos/workstation.nix - ] [ - ./home/desktop/hyprland/. - ./home/workstation.nix - ]; + { + nixos-modules = [ + ./hardware/vm.nix + (auto-login "Hyprland") + ./nixos/workstation.nix + ]; + home-modules = [ + ./home/desktop/hyprland/. + ./home/workstation.nix + ]; + }; - vm-tty = mkConf [ - ./hardware/vm.nix - ] []; + vm-tty = + mkConf + { + nixos-modules = [ + ./hardware/vm.nix + ]; + }; + }; + + packages.${system} = { + nixvim = let + nixvim' = nixvim.legacyPackages.${system}; + nixvimModule = { + inherit pkgs; + module = import ./lib/nixvim.nix; + }; + nvim = nixvim'.makeNixvimWithModule nixvimModule; + in + nvim; }; }; } diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 0c377f0..b005513 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -14,7 +14,6 @@ text = config.lib.stylix.colors.base05; }; rgb = color: "rgb(${color})"; - in { imports = [ (import ../utils/waybar.nix) diff --git a/home/programs/neovim/config.lua b/home/programs/neovim/config.lua deleted file mode 100644 index 68fc1f4..0000000 --- a/home/programs/neovim/config.lua +++ /dev/null @@ -1,30 +0,0 @@ -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' -vim.o.relativenumber = true -vim.o.number = true -vim.o.signcolumn = 'yes' -vim.o.tabstop = 2 -vim.o.shiftwidth = 2 -vim.o.expandtab = true -vim.o.smartindent = true -vim.o.scrolloff = 4 -vim.o.undofile = true -vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo") - -vim.keymap.set("v", "J", ":m '>+1gv=gv") -vim.keymap.set("v", "K", ":m '<-2gv=gv") - -vim.keymap.set("x", "p", "\"_dP") - -vim.keymap.set("n", "y", "\"+y") -vim.keymap.set("v", "y", "\"+y") - --- Global mappings. --- See `:help vim.diagnostic.*` for documentation on any of the below functions -vim.keymap.set('n', 'e', vim.diagnostic.open_float) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist) - -vim.keymap.set('v', '', '"+y') -vim.keymap.set('i', '', '"+p') diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index fc4d219..dfbee38 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -1,56 +1,9 @@ {pkgs, ...}: { - programs.neovim = { - enable = true; - defaultEditor = true; - extraLuaConfig = '' - ${builtins.readFile ./config.lua} - ''; - extraPackages = with pkgs; [ - nodePackages_latest.typescript-language-server - vscode-langservers-extracted - gopls - nil - rust-analyzer - ]; - plugins = with pkgs.vimPlugins; [ - { - plugin = nvim-surround; - type = "lua"; - config = '' - require("nvim-surround").setup() - ''; - } - { - plugin = comment-nvim; - type = "lua"; - config = '' - require("Comment").setup() - ''; - } - { - plugin = vimwiki; - config = '' - let g:vimwiki_list = [{'path': '~/Documents/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] - ''; - } - { - plugin = telescope-nvim; - type = "lua"; - config = '' - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'ff', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - vim.keymap.set('n', 'fb', builtin.buffers, {}) - vim.keymap.set('n', 'fh', builtin.help_tags, {}) - ''; - } - { - plugin = nvim-lspconfig; - type = "lua"; - config = builtins.readFile ./lspconfig.lua; - } - ]; - }; + programs.nixvim = + { + enable = true; + } + // import ../../../lib/nixvim.nix; programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; diff --git a/home/programs/neovim/lspconfig.lua b/home/programs/neovim/lspconfig.lua deleted file mode 100644 index 6d39e7f..0000000 --- a/home/programs/neovim/lspconfig.lua +++ /dev/null @@ -1,54 +0,0 @@ --- Setup language servers. -local lspconfig = require('lspconfig') - -local on_attach = function(client) - require'completion'.on_attach(client) - client.server_capabilities.documentFormattingProvider = false -end - -lspconfig.tsserver.setup { - on_attach = on_attach -} - -lspconfig.eslint.setup { - on_attach = on_attach -} - -lspconfig.rust_analyzer.setup { - on_attach = on_attach -} - -lspconfig.gopls.setup {} -lspconfig.nil_ls.setup {} -lspconfig.rust_analyzer.setup {} - --- Use LspAttach autocommand to only map the following keys --- after the language server attaches to the current buffer -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - -- Enable completion triggered by - vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' - - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) - vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format { async = true } - end, opts) - end, -}) diff --git a/lib/mkconf.nix b/lib/mkconf.nix index f5b3e14..f779cdb 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -4,8 +4,11 @@ user, userFullname, ... -}: modules: home-modules: let - inherit (inputs) home-manager nixpkgs sops-nix; +}: { + nixos-modules ? [], + home-modules ? [], +}: let + inherit (inputs) home-manager nixpkgs sops-nix nixvim; in nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; @@ -13,9 +16,8 @@ in inherit system; modules = - modules + nixos-modules ++ [ - ../nixos/modules/podman.nix home-manager.nixosModules.home-manager sops-nix.nixosModules.sops { @@ -25,6 +27,7 @@ in users.${user}.imports = home-modules ++ [ + nixvim.homeManagerModules.nixvim ../home/. { options.home.userFullname = nixpkgs.lib.mkOption {default = userFullname;}; diff --git a/lib/nixvim.nix b/lib/nixvim.nix new file mode 100644 index 0000000..f242a04 --- /dev/null +++ b/lib/nixvim.nix @@ -0,0 +1,106 @@ +{ + globals = { + mapleader = " "; + }; + opts = { + number = true; + relativenumber = true; + tabstop = 2; + shiftwidth = 2; + expandtab = true; + smartindent = true; + scrolloff = 4; + + undofile = true; + }; + extraConfigLua = '' + vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo") + ''; + keymaps = [ + { + key = ""; + action = ''"+y''; + } + { + key = "gl"; + action = "g$"; + } + { + key = "gh"; + action = "g0"; + } + { + key = "ggs"; + action = ":Gitsigns stage_hunk"; + } + { + key = "ggb"; + action = ":Gitsigns blame"; + } + { + key = "ggg"; + action = ":LazyGit"; + } + ]; + + plugins = { + bufferline.enable = true; + surround.enable = true; + comment.enable = true; + + markdown-preview.enable = true; + treesitter.enable = true; + + telescope = { + enable = true; + keymaps = { + "fg" = "live_grep"; + "/" = "live_grep"; + "ff" = "find_files"; + "fb" = "buffers"; + "fh" = "help_tags"; + ":" = "commands"; + }; + }; + + lsp = { + enable = true; + servers = { + tsserver.enable = true; + nixd.enable = true; + }; + keymaps = { + lspBuf = { + "K" = "hover"; + "a" = "code_action"; + "gd" = "definition"; + }; + diagnostic = { + "e" = "open_float"; + }; + }; + }; + + cmp = { + enable = true; + autoEnableSources = true; + }; + + cmp-nvim-lsp.enable = true; + cmp-path.enable = true; + + ts-autotag.enable = true; + + gitsigns.enable = true; + git-worktree = { + enable = true; + enableTelescope = true; + }; + lazygit.enable = true; + which-key.enable = true; + toggleterm = { + enable = true; + settings = {open_mapping = "[[]]";}; + }; + }; +} diff --git a/nixos/default.nix b/nixos/default.nix index 80ce0b5..a4757ad 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -8,6 +8,11 @@ }: let user = config.user; in { + + imports = [ + ./modules/podman.nix + ]; + nix = { settings = { experimental-features = ["nix-command" "flakes"]; @@ -113,10 +118,15 @@ in { bind -n M-+ resize-pane -U 10 bind -n M-u copy-mode bind -n M-p paste-buffer + bind -n M-n next-window set-window-option -g mode-keys vi bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection + + set -g mouse on + + bind -n "M-`" break-pane -d ''; boot.kernel.sysctl = { From ee31c8b2f9e9e4e3461f12bb0426fce6e7214513 Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 31 Jul 2024 00:23:35 +0100 Subject: [PATCH 16/65] nixbook: nixvim harpoon --- lib/nixvim.nix | 21 +++++++++++++++++++++ nixos/default.nix | 3 +-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/nixvim.nix b/lib/nixvim.nix index f242a04..28417fb 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -20,6 +20,7 @@ { key = ""; action = ''"+y''; + options.desc = "copy to clipboard"; } { key = "gl"; @@ -29,17 +30,25 @@ key = "gh"; action = "g0"; } + { + key = "q"; + action = ":bd"; + options.desc = "close buffer"; + } { key = "ggs"; action = ":Gitsigns stage_hunk"; + options.desc = "git stage hunk"; } { key = "ggb"; action = ":Gitsigns blame"; + options.desc = "show git blame"; } { key = "ggg"; action = ":LazyGit"; + options.desc = "open lazy git"; } ]; @@ -96,11 +105,23 @@ enable = true; enableTelescope = true; }; + lazygit.enable = true; which-key.enable = true; toggleterm = { enable = true; settings = {open_mapping = "[[]]";}; }; + + harpoon = { + enable = true; + keymaps = { + addFile = "ha"; + toggleQuickMenu = "hf"; + navNext = "n"; + }; + }; + + vim-css-color.enable = true; }; } diff --git a/nixos/default.nix b/nixos/default.nix index a4757ad..eb3aa89 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -8,7 +8,6 @@ }: let user = config.user; in { - imports = [ ./modules/podman.nix ]; @@ -124,7 +123,7 @@ in { bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection - set -g mouse on + set -g mouse on bind -n "M-`" break-pane -d ''; From 8358376a4ac69aa535941b0cb80323a1e297d929 Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 31 Jul 2024 17:11:51 +0100 Subject: [PATCH 17/65] nixbook: fix xdph and update nixvim bindings --- home/desktop/hyprland/default.nix | 2 +- lib/nixvim.nix | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index b005513..35e22ba 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -22,7 +22,7 @@ in { xdg.portal = { enable = true; configPackages = [pkgs.hyprland]; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; + extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland]; }; services.hypridle = { diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 28417fb..845aaa1 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -40,6 +40,11 @@ action = ":Gitsigns stage_hunk"; options.desc = "git stage hunk"; } + { + key = "ggr"; + action = ":LazyGit"; + options.desc = "git restore hunk"; + } { key = "ggb"; action = ":Gitsigns blame"; @@ -81,11 +86,12 @@ keymaps = { lspBuf = { "K" = "hover"; - "a" = "code_action"; + "ca" = "code_action"; + "cr" = "rename"; "gd" = "definition"; }; diagnostic = { - "e" = "open_float"; + "ch" = "open_float"; }; }; }; From 55a7e151d4cbb0725cf8f500ca748833ba7ed389 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 30 Jul 2024 13:29:13 +0100 Subject: [PATCH 18/65] nixbook: nixvim nixbook: add more nixvim plugins --- flake.lock | 259 ++++++++++++++++++++++++++++- flake.nix | 135 +++++++++------ home/desktop/hyprland/default.nix | 1 - home/programs/neovim/config.lua | 30 ---- home/programs/neovim/default.nix | 57 +------ home/programs/neovim/lspconfig.lua | 54 ------ lib/mkconf.nix | 11 +- lib/nixvim.nix | 106 ++++++++++++ nixos/default.nix | 10 ++ 9 files changed, 470 insertions(+), 193 deletions(-) delete mode 100644 home/programs/neovim/config.lua delete mode 100644 home/programs/neovim/lspconfig.lua create mode 100644 lib/nixvim.nix diff --git a/flake.lock b/flake.lock index b4aa8e0..8c38799 100644 --- a/flake.lock +++ b/flake.lock @@ -114,6 +114,27 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "owner": "numtide", + "repo": "devshell", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -131,6 +152,20 @@ } }, "flake-compat_2": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1673956053, @@ -146,6 +181,45 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -162,6 +236,58 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721042469, + "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -201,6 +327,27 @@ } }, "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722119539, + "narHash": "sha256-2kU90liMle0vKR8exJx1XM4hZh9CdNgZGHCTbeA9yzY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d0240a064db3987eb4d5204cf2400bc4452d9922", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { "inputs": { "nixpkgs": [ "stylix", @@ -221,6 +368,27 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722082646, + "narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", @@ -322,11 +490,62 @@ "type": "github" } }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1722248209, + "narHash": "sha256-yYoxx5hVrI7JaiPy44sgnr5YIRXWY7ttNoN/l5fJOgI=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "2089eb407d8c5dbd6ca6e93d4988a439ca6446fd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722144272, + "narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", + "owner": "NuschtOS", + "repo": "search", + "rev": "16565307c267ec219c2b5d3494ba66df08e7d403", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nixos-cosmic": "nixos-cosmic", "nixpkgs": "nixpkgs", + "nixvim": "nixvim", "sops-nix": "sops-nix", "stylix": "stylix" } @@ -359,9 +578,9 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -377,6 +596,42 @@ "repo": "stylix", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721769617, + "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 87fd1d2..976798f 100644 --- a/flake.nix +++ b/flake.nix @@ -12,9 +12,13 @@ url = "github:lilyinstarlight/nixos-cosmic"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs: let + outputs = {nixvim, ...} @ inputs: let system = "x86_64-linux"; pkgs = import inputs.nixpkgs {inherit system;}; user = "tristan"; @@ -25,14 +29,15 @@ in { formatter.${system} = pkgs.alejandra; nixosConfigurations = { - zenix = - mkConf [ + zenix = mkConf { + nixos-modules = [ ./hardware/zenix.nix (auto-login "Hyprland") ./nixos/programs/gamer.nix ./nixos/programs/personal.nix ./nixos/workstation.nix - ] [ + ]; + home-modules = [ ./home/workstation.nix ./home/desktop/hyprland/. ./home/programs/graphical.nix @@ -40,37 +45,42 @@ ./home/programs/personal/. ./home/programs/xr.nix ]; + }; - FCS-Tristan-Nixbook = - mkConf [ + FCS-Tristan-Nixbook = mkConf { + nixos-modules = [ ./hardware/fcs-tristan-nixbook.nix (auto-login "Hyprland") ./nixos/modules/work.nix ./nixos/workstation.nix - ] [ + ]; + home-modules = [ ./home/workstation.nix ./home/desktop/hyprland/. ./home/programs/work.nix ./home/programs/graphical.nix ]; + }; - alpine = mkConf [ - ./hardware/alpine.nix - ./nixos/services/anki.nix - ./nixos/services/forgejo.nix - ./nixos/services/vaultwarden.nix - ./nixos/services/jellyfin.nix - ./nixos/services/mpd.nix - ./nixos/services/prometheus.nix - ./nixos/services/grafana.nix - ./nixos/services/synapse.nix - ./nixos/services/mautrix/whatsapp.nix - ./nixos/services/mautrix/signal.nix - ./nixos/services/nextcloud.nix - ./nixos/services/ntfy.nix - ./nixos/services/authentik.nix - ./nixos/services/monero.nix - ] []; + alpine = mkConf { + nixos-modules = [ + ./hardware/alpine.nix + ./nixos/services/anki.nix + ./nixos/services/forgejo.nix + ./nixos/services/vaultwarden.nix + ./nixos/services/jellyfin.nix + ./nixos/services/mpd.nix + ./nixos/services/prometheus.nix + ./nixos/services/grafana.nix + ./nixos/services/synapse.nix + ./nixos/services/mautrix/whatsapp.nix + ./nixos/services/mautrix/signal.nix + ./nixos/services/nextcloud.nix + ./nixos/services/ntfy.nix + ./nixos/services/authentik.nix + ./nixos/services/monero.nix + ]; + }; vm-sway = builtins.trace '' @@ -80,24 +90,30 @@ start the vm with '-vga qxl' or '-vga virtio' '' mkConf - [ - ./hardware/vm.nix - (auto-login "sway") - ./nixos/workstation.nix - ] [ - ./home/desktop/sway/. - ./home/workstation.nix - ]; + { + nixos-modules = [ + ./hardware/vm.nix + (auto-login "sway") + ./nixos/workstation.nix + ]; + home-modules = [ + ./home/desktop/sway/. + ./home/workstation.nix + ]; + }; vm-cosmic = mkConf - [ - ./hardware/vm.nix - ./nixos/workstation.nix - ./nixos/programs/cosmic.nix - ] [ - ./home/workstation.nix - ]; + { + nixos-modules = [ + ./hardware/vm.nix + ./nixos/workstation.nix + ./nixos/programs/cosmic.nix + ]; + home-modules = [ + ./home/workstation.nix + ]; + }; vm-hyprland = builtins.trace '' @@ -109,18 +125,37 @@ start with '-vga virtio' '' mkConf - [ - ./hardware/vm.nix - (auto-login "Hyprland") - ./nixos/workstation.nix - ] [ - ./home/desktop/hyprland/. - ./home/workstation.nix - ]; + { + nixos-modules = [ + ./hardware/vm.nix + (auto-login "Hyprland") + ./nixos/workstation.nix + ]; + home-modules = [ + ./home/desktop/hyprland/. + ./home/workstation.nix + ]; + }; - vm-tty = mkConf [ - ./hardware/vm.nix - ] []; + vm-tty = + mkConf + { + nixos-modules = [ + ./hardware/vm.nix + ]; + }; + }; + + packages.${system} = { + nixvim = let + nixvim' = nixvim.legacyPackages.${system}; + nixvimModule = { + inherit pkgs; + module = import ./lib/nixvim.nix; + }; + nvim = nixvim'.makeNixvimWithModule nixvimModule; + in + nvim; }; }; } diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 0471c1c..2d90459 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -14,7 +14,6 @@ text = config.lib.stylix.colors.base05; }; rgb = color: "rgb(${color})"; - in { imports = [ (import ../utils/waybar.nix) diff --git a/home/programs/neovim/config.lua b/home/programs/neovim/config.lua deleted file mode 100644 index 68fc1f4..0000000 --- a/home/programs/neovim/config.lua +++ /dev/null @@ -1,30 +0,0 @@ -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' -vim.o.relativenumber = true -vim.o.number = true -vim.o.signcolumn = 'yes' -vim.o.tabstop = 2 -vim.o.shiftwidth = 2 -vim.o.expandtab = true -vim.o.smartindent = true -vim.o.scrolloff = 4 -vim.o.undofile = true -vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo") - -vim.keymap.set("v", "J", ":m '>+1gv=gv") -vim.keymap.set("v", "K", ":m '<-2gv=gv") - -vim.keymap.set("x", "p", "\"_dP") - -vim.keymap.set("n", "y", "\"+y") -vim.keymap.set("v", "y", "\"+y") - --- Global mappings. --- See `:help vim.diagnostic.*` for documentation on any of the below functions -vim.keymap.set('n', 'e', vim.diagnostic.open_float) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist) - -vim.keymap.set('v', '', '"+y') -vim.keymap.set('i', '', '"+p') diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index fc4d219..dfbee38 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -1,56 +1,9 @@ {pkgs, ...}: { - programs.neovim = { - enable = true; - defaultEditor = true; - extraLuaConfig = '' - ${builtins.readFile ./config.lua} - ''; - extraPackages = with pkgs; [ - nodePackages_latest.typescript-language-server - vscode-langservers-extracted - gopls - nil - rust-analyzer - ]; - plugins = with pkgs.vimPlugins; [ - { - plugin = nvim-surround; - type = "lua"; - config = '' - require("nvim-surround").setup() - ''; - } - { - plugin = comment-nvim; - type = "lua"; - config = '' - require("Comment").setup() - ''; - } - { - plugin = vimwiki; - config = '' - let g:vimwiki_list = [{'path': '~/Documents/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] - ''; - } - { - plugin = telescope-nvim; - type = "lua"; - config = '' - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'ff', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - vim.keymap.set('n', 'fb', builtin.buffers, {}) - vim.keymap.set('n', 'fh', builtin.help_tags, {}) - ''; - } - { - plugin = nvim-lspconfig; - type = "lua"; - config = builtins.readFile ./lspconfig.lua; - } - ]; - }; + programs.nixvim = + { + enable = true; + } + // import ../../../lib/nixvim.nix; programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; diff --git a/home/programs/neovim/lspconfig.lua b/home/programs/neovim/lspconfig.lua deleted file mode 100644 index 6d39e7f..0000000 --- a/home/programs/neovim/lspconfig.lua +++ /dev/null @@ -1,54 +0,0 @@ --- Setup language servers. -local lspconfig = require('lspconfig') - -local on_attach = function(client) - require'completion'.on_attach(client) - client.server_capabilities.documentFormattingProvider = false -end - -lspconfig.tsserver.setup { - on_attach = on_attach -} - -lspconfig.eslint.setup { - on_attach = on_attach -} - -lspconfig.rust_analyzer.setup { - on_attach = on_attach -} - -lspconfig.gopls.setup {} -lspconfig.nil_ls.setup {} -lspconfig.rust_analyzer.setup {} - --- Use LspAttach autocommand to only map the following keys --- after the language server attaches to the current buffer -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - -- Enable completion triggered by - vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' - - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) - vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format { async = true } - end, opts) - end, -}) diff --git a/lib/mkconf.nix b/lib/mkconf.nix index f5b3e14..f779cdb 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -4,8 +4,11 @@ user, userFullname, ... -}: modules: home-modules: let - inherit (inputs) home-manager nixpkgs sops-nix; +}: { + nixos-modules ? [], + home-modules ? [], +}: let + inherit (inputs) home-manager nixpkgs sops-nix nixvim; in nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; @@ -13,9 +16,8 @@ in inherit system; modules = - modules + nixos-modules ++ [ - ../nixos/modules/podman.nix home-manager.nixosModules.home-manager sops-nix.nixosModules.sops { @@ -25,6 +27,7 @@ in users.${user}.imports = home-modules ++ [ + nixvim.homeManagerModules.nixvim ../home/. { options.home.userFullname = nixpkgs.lib.mkOption {default = userFullname;}; diff --git a/lib/nixvim.nix b/lib/nixvim.nix new file mode 100644 index 0000000..f242a04 --- /dev/null +++ b/lib/nixvim.nix @@ -0,0 +1,106 @@ +{ + globals = { + mapleader = " "; + }; + opts = { + number = true; + relativenumber = true; + tabstop = 2; + shiftwidth = 2; + expandtab = true; + smartindent = true; + scrolloff = 4; + + undofile = true; + }; + extraConfigLua = '' + vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo") + ''; + keymaps = [ + { + key = ""; + action = ''"+y''; + } + { + key = "gl"; + action = "g$"; + } + { + key = "gh"; + action = "g0"; + } + { + key = "ggs"; + action = ":Gitsigns stage_hunk"; + } + { + key = "ggb"; + action = ":Gitsigns blame"; + } + { + key = "ggg"; + action = ":LazyGit"; + } + ]; + + plugins = { + bufferline.enable = true; + surround.enable = true; + comment.enable = true; + + markdown-preview.enable = true; + treesitter.enable = true; + + telescope = { + enable = true; + keymaps = { + "fg" = "live_grep"; + "/" = "live_grep"; + "ff" = "find_files"; + "fb" = "buffers"; + "fh" = "help_tags"; + ":" = "commands"; + }; + }; + + lsp = { + enable = true; + servers = { + tsserver.enable = true; + nixd.enable = true; + }; + keymaps = { + lspBuf = { + "K" = "hover"; + "a" = "code_action"; + "gd" = "definition"; + }; + diagnostic = { + "e" = "open_float"; + }; + }; + }; + + cmp = { + enable = true; + autoEnableSources = true; + }; + + cmp-nvim-lsp.enable = true; + cmp-path.enable = true; + + ts-autotag.enable = true; + + gitsigns.enable = true; + git-worktree = { + enable = true; + enableTelescope = true; + }; + lazygit.enable = true; + which-key.enable = true; + toggleterm = { + enable = true; + settings = {open_mapping = "[[]]";}; + }; + }; +} diff --git a/nixos/default.nix b/nixos/default.nix index 80ce0b5..a4757ad 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -8,6 +8,11 @@ }: let user = config.user; in { + + imports = [ + ./modules/podman.nix + ]; + nix = { settings = { experimental-features = ["nix-command" "flakes"]; @@ -113,10 +118,15 @@ in { bind -n M-+ resize-pane -U 10 bind -n M-u copy-mode bind -n M-p paste-buffer + bind -n M-n next-window set-window-option -g mode-keys vi bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection + + set -g mouse on + + bind -n "M-`" break-pane -d ''; boot.kernel.sysctl = { From 681c8705048830f14574aa8d20ee8a01cd90289a Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 31 Jul 2024 17:15:34 +0100 Subject: [PATCH 19/65] zenix: add neovim godot dap --- home/programs/personal/default.nix | 29 ++++++++++++++++++++++++----- lib/nixvim.nix | 5 +++++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/home/programs/personal/default.nix b/home/programs/personal/default.nix index d2ff861..5c24f89 100644 --- a/home/programs/personal/default.nix +++ b/home/programs/personal/default.nix @@ -14,20 +14,39 @@ services.nextcloud-client.enable = true; + programs.nixvim.plugins = { + lsp = { + servers.gdscript.enable = true; + }; + godot.enable = true; + dap = { + enable = true; + adapters.servers.godot = { + host = "127.0.0.1"; + port = 6006; + }; + configurations.gdscript = [ + { + type = "godot"; + request = "launch"; + name = "Launch scene"; + project = "\${workspaceFolder}"; + } + ]; + + }; + }; + home.packages = with pkgs; [ godot_4 ardour blender - # musescore + musescore monero-gui - electrum - xmrig transmission-remote-gtk krita organicmaps anki - hugo - libsForQt5.neochat bookworm jellyfin-mpv-shim ]; diff --git a/lib/nixvim.nix b/lib/nixvim.nix index f242a04..ce6025f 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -102,5 +102,10 @@ enable = true; settings = {open_mapping = "[[]]";}; }; + + dap = { + enable = true; + extensions.dap-ui.enable = true; + }; }; } From bbadda1419420128fb15ad87d4f09350df997ca8 Mon Sep 17 00:00:00 2001 From: Tristan Date: Sat, 3 Aug 2024 00:58:17 +0100 Subject: [PATCH 20/65] nixbook: fix xdph, update tmux conf --- home/desktop/hyprland/default.nix | 2 +- lib/nixvim.nix | 2 ++ nixos/default.nix | 10 +++++++++- nixos/workstation.nix | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 35e22ba..b005513 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -22,7 +22,7 @@ in { xdg.portal = { enable = true; configPackages = [pkgs.hyprland]; - extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland]; + extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; services.hypridle = { diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 845aaa1..606d6e3 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -87,11 +87,13 @@ lspBuf = { "K" = "hover"; "ca" = "code_action"; + "" = "code_action"; "cr" = "rename"; "gd" = "definition"; }; diagnostic = { "ch" = "open_float"; + "" = "open_float"; }; }; }; diff --git a/nixos/default.nix b/nixos/default.nix index eb3aa89..fe091fb 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -100,8 +100,9 @@ in { programs.tmux.enable = true; programs.tmux.extraConfig = '' + set-option -sa terminal-overrides ",xterm*:Tc" + set escape-time 0 - set -g default-terminal screen bind -n M-s split-window -v bind -n M-v split-window -h @@ -115,6 +116,7 @@ in { bind -n M-> resize-pane -R 10 bind -n M-- resize-pane -D 10 bind -n M-+ resize-pane -U 10 + bind -n M-z resize-pane -Z bind -n M-u copy-mode bind -n M-p paste-buffer bind -n M-n next-window @@ -125,6 +127,12 @@ in { set -g mouse on + set -g base-index 1 + set -g pane-base-index 1 + set-window-option -g pane-base-index 1 + set-option -g renumber-windows on + + bind -n "M-`" break-pane -d bind -n "M-`" break-pane -d ''; diff --git a/nixos/workstation.nix b/nixos/workstation.nix index 2d9e181..a616009 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -11,6 +11,8 @@ "electron-27.3.11" ]; + programs.hyprland.enable = true; + # use pipewire hardware.pulseaudio.enable = false; security.rtkit.enable = true; From 44c0812e94d07ff53348123e83aff5174a3886c1 Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 3 Aug 2024 18:31:13 +0100 Subject: [PATCH 21/65] zenix: tidy up --- flake.nix | 12 +++------ home/default.nix | 1 + home/desktop/hyprland/default.nix | 1 + home/modules/menu.nix | 3 ++- home/programs/graphical.nix | 1 - home/programs/personal/default.nix | 1 - home/programs/tmux.nix | 43 ++++++++++++++++++++++++++++++ lib/nixvim.nix | 4 --- nixos/default.nix | 39 --------------------------- nixos/programs/hyprland.nix | 13 +++++++++ nixos/programs/pipewire.nix | 15 +++++++++++ nixos/workstation.nix | 22 --------------- 12 files changed, 78 insertions(+), 77 deletions(-) create mode 100644 home/programs/tmux.nix create mode 100644 nixos/programs/hyprland.nix create mode 100644 nixos/programs/pipewire.nix diff --git a/flake.nix b/flake.nix index 976798f..8c2f542 100644 --- a/flake.nix +++ b/flake.nix @@ -33,13 +33,12 @@ nixos-modules = [ ./hardware/zenix.nix (auto-login "Hyprland") + ./nixos/programs/hyprland.nix ./nixos/programs/gamer.nix ./nixos/programs/personal.nix ./nixos/workstation.nix ]; home-modules = [ - ./home/workstation.nix - ./home/desktop/hyprland/. ./home/programs/graphical.nix ./home/programs/gamer.nix ./home/programs/personal/. @@ -51,11 +50,10 @@ nixos-modules = [ ./hardware/fcs-tristan-nixbook.nix (auto-login "Hyprland") + ./nixos/hyprland.nix ./nixos/modules/work.nix - ./nixos/workstation.nix ]; home-modules = [ - ./home/workstation.nix ./home/desktop/hyprland/. ./home/programs/work.nix ./home/programs/graphical.nix @@ -129,11 +127,7 @@ nixos-modules = [ ./hardware/vm.nix (auto-login "Hyprland") - ./nixos/workstation.nix - ]; - home-modules = [ - ./home/desktop/hyprland/. - ./home/workstation.nix + ./nixos/programs/hyprland.nix ]; }; diff --git a/home/default.nix b/home/default.nix index c75a258..7fc5d0d 100644 --- a/home/default.nix +++ b/home/default.nix @@ -10,6 +10,7 @@ ./programs/git.nix ./programs/lf/. ./programs/zsh.nix + ./programs/tmux.nix ]; programs.home-manager.enable = true; diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 2d90459..33fb7a2 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -18,6 +18,7 @@ in { imports = [ (import ../utils/waybar.nix) (import ../utils/display.nix) + ../../workstation.nix ]; xdg.portal = { enable = true; diff --git a/home/modules/menu.nix b/home/modules/menu.nix index 3e7943b..ea30348 100644 --- a/home/modules/menu.nix +++ b/home/modules/menu.nix @@ -8,8 +8,9 @@ terminal = config.programs.terminal; termcmd = "${terminal}/bin/${terminal.pname}"; menucmd = config.programs.menu.drunCommand; + inherit (lib) mkPackageOption mkOption; in { - options.programs = with lib; { + options.programs = { menu = { package = mkPackageOption pkgs "wofi" { example = "pkgs.dmenu-wayland"; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 342376f..70bc7d2 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -37,7 +37,6 @@ brave vieb bitwarden - logseq ]; xdg.mimeApps.defaultApplications = { diff --git a/home/programs/personal/default.nix b/home/programs/personal/default.nix index 5c24f89..a740d23 100644 --- a/home/programs/personal/default.nix +++ b/home/programs/personal/default.nix @@ -33,7 +33,6 @@ project = "\${workspaceFolder}"; } ]; - }; }; diff --git a/home/programs/tmux.nix b/home/programs/tmux.nix new file mode 100644 index 0000000..f2b301d --- /dev/null +++ b/home/programs/tmux.nix @@ -0,0 +1,43 @@ +{ + programs.tmux = { + enable = true; + baseIndex = 1; + escapeTime = 0; + keyMode = "vi"; + mouse = true; + terminal = "screen-256color"; + historyLimit = 5000; + extraConfig = '' + bind -n M-s split-window -v + bind -n M-v split-window -h + bind -n M-Enter split-window -h + bind -n M-h select-pane -L + bind -n M-j select-pane -D + bind -n M-k select-pane -U + bind -n M-l select-pane -R + bind -n M-q kill-pane + bind -n M-< resize-pane -L 10 + bind -n M-> resize-pane -R 10 + bind -n M-- resize-pane -D 10 + bind -n M-+ resize-pane -U 10 + bind -n M-z resize-pane -Z + bind -n M-u copy-mode + bind -n M-p paste-buffer + bind -n M-n next-window + + set-option -g renumber-windows on + ''; + }; + + # programs.kitty = { + # enable = true; + # keybindings = { + # "alt+h" = "neighboring_window left"; + # "alt+l" = "neighboring_window right"; + # "alt+j" = "neighboring_window down"; + # "alt+k" = "neighboring_window up"; + # "alt+enter" = "new_window"; + # }; + # shellIntegration.enableZshIntegration = true; + # }; +} diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 1b0570a..75ef7a0 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -121,10 +121,6 @@ lazygit.enable = true; which-key.enable = true; - toggleterm = { - enable = true; - settings = {open_mapping = "[[]]";}; - }; dap = { enable = true; diff --git a/nixos/default.nix b/nixos/default.nix index 122f780..68a84c1 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -8,7 +8,6 @@ }: let user = config.user; in { - imports = [ ./modules/podman.nix ]; @@ -99,44 +98,6 @@ in { sops ]; - programs.tmux.enable = true; - programs.tmux.extraConfig = '' - set-option -sa terminal-overrides ",xterm*:Tc" - - set escape-time 0 - - bind -n M-s split-window -v - bind -n M-v split-window -h - bind -n M-Enter split-window -h - bind -n M-h select-pane -L - bind -n M-j select-pane -D - bind -n M-k select-pane -U - bind -n M-l select-pane -R - bind -n M-q kill-pane - bind -n M-< resize-pane -L 10 - bind -n M-> resize-pane -R 10 - bind -n M-- resize-pane -D 10 - bind -n M-+ resize-pane -U 10 - bind -n M-z resize-pane -Z - bind -n M-u copy-mode - bind -n M-p paste-buffer - bind -n M-n next-window - - set-window-option -g mode-keys vi - bind-key -T copy-mode-vi v send-keys -X begin-selection - bind-key -T copy-mode-vi y send-keys -X copy-selection - - set -g mouse on - - set -g base-index 1 - set -g pane-base-index 1 - set-window-option -g pane-base-index 1 - set-option -g renumber-windows on - - bind -n "M-`" break-pane -d - bind -n "M-`" break-pane -d - ''; - boot.kernel.sysctl = { "net.ipv4.ip_unprivileged_port_start" = 53; }; diff --git a/nixos/programs/hyprland.nix b/nixos/programs/hyprland.nix new file mode 100644 index 0000000..0b00516 --- /dev/null +++ b/nixos/programs/hyprland.nix @@ -0,0 +1,13 @@ +{config, ...}: { + programs.hyprland.enable = true; + security.pam.services.hyprlock = {}; + + imports = [ + ./pipewire.nix + ../workstation.nix + ]; + + home-manager.users.${config.user}.imports = [ + ../../home/desktop/hyprland/. + ]; +} diff --git a/nixos/programs/pipewire.nix b/nixos/programs/pipewire.nix new file mode 100644 index 0000000..2610134 --- /dev/null +++ b/nixos/programs/pipewire.nix @@ -0,0 +1,15 @@ +{ + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + # pipewire raop + networking.firewall.allowedUDPPorts = [6002 6001]; + # network streaming + networking.firewall.allowedTCPPorts = [4713]; +} diff --git a/nixos/workstation.nix b/nixos/workstation.nix index a616009..dd667e0 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -7,29 +7,7 @@ imports = [ inputs.stylix.nixosModules.stylix ]; - nixpkgs.config.permittedInsecurePackages = [ - "electron-27.3.11" - ]; - programs.hyprland.enable = true; - - # use pipewire - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - # pipewire raop - networking.firewall.allowedUDPPorts = [6002 6001]; - # network streaming - networking.firewall.allowedTCPPorts = [4713]; - - security.pam.services.swaylock = {}; - security.pam.services.hyprlock = {}; security.polkit.enable = true; systemd.user.services.polkit-gnome-authentication-agent-1 = { description = "polkit-gnome-authentication-agent-1"; From 293b770acb92ce5db3cf39aef0540c4a9ffb646e Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 4 Aug 2024 15:19:07 +0100 Subject: [PATCH 22/65] zenix: update, zoxide, more tidy --- flake.lock | 54 +++++++-------- home/default.nix | 4 +- home/modules/email.nix | 134 ------------------------------------ home/programs/graphical.nix | 4 -- pkgs/mpv-skipsilence.nix | 6 +- 5 files changed, 33 insertions(+), 169 deletions(-) diff --git a/flake.lock b/flake.lock index 8c38799..5a73c77 100644 --- a/flake.lock +++ b/flake.lock @@ -312,11 +312,11 @@ ] }, "locked": { - "lastModified": 1722067813, - "narHash": "sha256-nxpzoKXwn+8RsxpxwD86mtEscOMw64ZD/vGSNWzGMlA=", + "lastModified": 1722630065, + "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", "owner": "nix-community", "repo": "home-manager", - "rev": "975b83ca560d17db51a66cb2b0dc0e44213eab27", + "rev": "afc892db74d65042031a093adb6010c4c3378422", "type": "github" }, "original": { @@ -334,11 +334,11 @@ ] }, "locked": { - "lastModified": 1722119539, - "narHash": "sha256-2kU90liMle0vKR8exJx1XM4hZh9CdNgZGHCTbeA9yzY=", + "lastModified": 1722407237, + "narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=", "owner": "nix-community", "repo": "home-manager", - "rev": "d0240a064db3987eb4d5204cf2400bc4452d9922", + "rev": "58cef3796271aaeabaed98884d4abaab5d9d162d", "type": "github" }, "original": { @@ -398,11 +398,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1721160462, - "narHash": "sha256-/VxDWswjySr3CUuMRP4OBBP3sFSps7r1Bh/AJkZSdVk=", + "lastModified": 1722648908, + "narHash": "sha256-yBHD6n75iXj8D3YonPf7k32N+m4UOUCW/Yq/+gYvadg=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "b2d62f3b793495c1156cba6a99512cd95ac2c439", + "rev": "5e56434064e3b3c8fb1d553322a0fbd04d2c277a", "type": "github" }, "original": { @@ -413,11 +413,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1721924956, - "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", + "lastModified": 1722421184, + "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ad6a14c6bf098e98800b091668718c336effc95", + "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", "type": "github" }, "original": { @@ -428,11 +428,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1720954236, - "narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=", + "lastModified": 1722519197, + "narHash": "sha256-VEdJmVU2eLFtLqCjTYJd1J7+Go8idAcZoT11IewFiRg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27", + "rev": "05405724efa137a0b899cce5ab4dde463b4fd30b", "type": "github" }, "original": { @@ -505,11 +505,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1722248209, - "narHash": "sha256-yYoxx5hVrI7JaiPy44sgnr5YIRXWY7ttNoN/l5fJOgI=", + "lastModified": 1722605918, + "narHash": "sha256-eWVY6hM2IlxRIVUgKBlPCX4pJ1Nmh3Nvw/Io2LaE0Y4=", "owner": "nix-community", "repo": "nixvim", - "rev": "2089eb407d8c5dbd6ca6e93d4988a439ca6446fd", + "rev": "0bc169903705c94fda7934ecc27dd9038ad5f0e9", "type": "github" }, "original": { @@ -556,11 +556,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1721688883, - "narHash": "sha256-9jsjsRKtJRqNSTXKj9zuDFRf2PGix30nMx9VKyPgD2U=", + "lastModified": 1722114803, + "narHash": "sha256-s6YhI8UHwQvO4cIFLwl1wZ1eS5Cuuw7ld2VzUchdFP0=", "owner": "Mic92", "repo": "sops-nix", - "rev": "aff2f88277dabe695de4773682842c34a0b7fd54", + "rev": "eb34eb588132d653e4c4925d862f1e5a227cc2ab", "type": "github" }, "original": { @@ -584,11 +584,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1721989207, - "narHash": "sha256-APKQeMMdh1O1W3OnxEvNfHNBiE4eRvEN6rosFr2dLHE=", + "lastModified": 1722295291, + "narHash": "sha256-3XpT9GMw50NCGT1Gd2YAwEjrEcFtDqnuQ7sRUcuU/Pc=", "owner": "danth", "repo": "stylix", - "rev": "b9de20c76e8d5c13cf2304d23cf589803c311670", + "rev": "feb2973dfa8232c07efbd2b48f11a5cfa2276570", "type": "github" }, "original": { @@ -620,11 +620,11 @@ ] }, "locked": { - "lastModified": 1721769617, - "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=", + "lastModified": 1722330636, + "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009", + "rev": "768acdb06968e53aa1ee8de207fd955335c754b7", "type": "github" }, "original": { diff --git a/home/default.nix b/home/default.nix index 7fc5d0d..6b72153 100644 --- a/home/default.nix +++ b/home/default.nix @@ -35,12 +35,14 @@ htop libsixel yt-dlp - ytfzf fastfetch tree ansible + ytfzf ]; + programs.zoxide.enable = true; + programs.rbw = { enable = true; settings = { diff --git a/home/modules/email.nix b/home/modules/email.nix index a4fc403..2cec84f 100644 --- a/home/modules/email.nix +++ b/home/modules/email.nix @@ -73,140 +73,6 @@ in { programs.aerc = { enable = cfg.terminal; - extraBinds = '' - # Binds are of the form = - # To use '=' in a key sequence, substitute it with "Eq": "" - # If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit - = :prev-tab - = :next-tab - = :term - - [messages] - Q = :quit - - T = :toggle-threads - - j = :next - = :next - = :next 50% - = :next 100% - = :next -s 100% - - k = :prev - = :prev - = :prev 50% - = :prev - = :prev -s 100% - gg = :select 0 - G = :select -1 - - J = :next-folder - K = :prev-folder - - v = :mark -t - V = :mark -v - - f = :flag - F = :unflag - - t = :toggle-threads - - = :view - D = :mv Trash - - C = :compose - - Rr = :reply - Rq = :reply -q - rr = :reply -a - rq = :reply -aq - rt = :unflag:reply -a -Tthanks - Rt = :unflag:reply -qa -Tquoted_thanks - - a = :mv Archive - - c = :cf - $ = :term - ! = :term - | = :pipe - - ga = :flag:pipe -mb git am -3 - gp = :term git push - gl = :term git log - - / = :search - \ = :filter - n = :next-result - N = :prev-result - - o = :term mbsync -a - q = :quit - - [view] - / = :toggle-key-passthrough/ - q = :close - | = :pipe -m - S = :save - H = :toggle-headers - D = :mv Trash - = :prev-part - = :next-part - J = :next - K = :prev - - f = :forward - Rr = :reply - Rq = :reply -q - rr = :reply -a - rq = :reply -aq - rt = :reply -Tthanks - - ga = :pipe -b git am -3 - gp = :term git push - gl = :term git log - - [view::passthrough] - $noinherit = true - $ex = - = :toggle-key-passthrough - - [compose] - $ex = - = :prev-field - = :next-field - = :next-field - - [compose::editor] - # Keybindings used when the embedded terminal is selected in the compose view - $noinherit = true - $ex = - = :term - = :prev-field - = :next-field - = :prev-tab - = :next-tab - - [compose::review] - # Keybindings used when reviewing a message to be sent - y = :send - n = :abort - e = :edit - a = :attach - c = :encrypt - s = :sign - V = :header -f X-Sourcehut-Patchset-Update NEEDS_REVISION - A = :header -f X-Sourcehut-Patchset-Update APPLIED - R = :header -f X-Sourcehut-Patchset-Update REJECTED - - [terminal] - $noinherit = true - $ex = - - = :term - = :prev-tab - = :next-tab - ''; - extraConfig = { general = { pgp-provider = "gpg"; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 70bc7d2..0b990fc 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -1,10 +1,8 @@ { pkgs, - lib, ... }: { imports = [ - ./qutebrowser.nix ./pcmanfm.nix ./mpv.nix ./vscode.nix @@ -24,7 +22,6 @@ gimp libreoffice dbeaver-bin - bruno drawio # entertainment @@ -35,7 +32,6 @@ nheko cinny-desktop brave - vieb bitwarden ]; diff --git a/pkgs/mpv-skipsilence.nix b/pkgs/mpv-skipsilence.nix index ffc0881..33d6b1f 100644 --- a/pkgs/mpv-skipsilence.nix +++ b/pkgs/mpv-skipsilence.nix @@ -4,20 +4,20 @@ fetchgit, gitUpdater, }: -buildLua rec { +buildLua { pname = "mpv-skipsilence"; version = "1.0"; src = fetchgit { url = "https://codeberg.org/ferreum/mpv-skipsilence.git"; - hash = "sha256-aAzLegotOUILhpz7GcMJvCY4R3jSZCDIKOwVfM21kdY="; + hash = "sha256-fg8vfeb68nr0bTBIvr0FnRnoB48/kV957pn22tWcz1g="; }; passthru.updateScript = gitUpdater {}; meta = with lib; { description = "Increase playback speed during silence - a revolution in attention-deficit induction technology."; homepage = "https://github.com/ferreum/mpv-skipsilence"; - license = licenses.unlicense; # actually they don't have a license + license = licenses.gpl2; maintainers = []; }; } From c567c5d94a1771b2d7d6b5c07059d6e2dc7ba681 Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 10 Aug 2024 11:47:22 +0100 Subject: [PATCH 23/65] zenix: fix: std linux, waybar on bottom layer, add aerc binds --- hardware/zenix.nix | 1 - home/desktop/utils/waybar.nix | 2 +- home/modules/aerc/binds.conf | 185 ++++++++++++++++++++++++++++++++++ home/modules/aerc/default.nix | 21 ++++ home/modules/email.nix | 18 +--- 5 files changed, 209 insertions(+), 18 deletions(-) create mode 100644 home/modules/aerc/binds.conf create mode 100644 home/modules/aerc/default.nix diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 0e439f4..8702d8b 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -17,7 +17,6 @@ in { boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; boot.initrd.kernelModules = ["uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1"]; boot.kernelModules = ["kvm-amd"]; - boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; boot.extraModulePackages = []; fileSystems."/" = { diff --git a/home/desktop/utils/waybar.nix b/home/desktop/utils/waybar.nix index 97fa670..f03354f 100644 --- a/home/desktop/utils/waybar.nix +++ b/home/desktop/utils/waybar.nix @@ -4,7 +4,7 @@ systemd.enable = true; settings = { mainBar = { - layer = "top"; + layer = "bottom"; position = "top"; height = 36; modules-right = ["mpris" "idle_inhibitor" "pulseaudio" "clock" "tray" "battery"]; diff --git a/home/modules/aerc/binds.conf b/home/modules/aerc/binds.conf new file mode 100644 index 0000000..8b4c057 --- /dev/null +++ b/home/modules/aerc/binds.conf @@ -0,0 +1,185 @@ +# Binds are of the form = +# To use '=' in a key sequence, substitute it with "Eq": "" +# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab +\[t = :prev-tab +\]t = :next-tab + = :term +? = :help keys + = :prompt 'Quit?' quit + = :prompt 'Quit?' quit + = :suspend + +[messages] +o = :term mbsync -a +q = :prompt 'Quit?' quit + +j = :next + = :next + = :next 50% + = :next 100% + = :next 100% + +k = :prev + = :prev + = :prev 50% + = :prev 100% + = :prev 100% +g = :select 0 +G = :select -1 + +J = :next-folder + = :next-folder +K = :prev-folder + = :prev-folder +H = :collapse-folder + = :collapse-folder +L = :expand-folder + = :expand-folder + +v = :mark -t + = :mark -t:next +V = :mark -v + +T = :toggle-threads +zc = :fold +zo = :unfold +za = :fold -t +zM = :fold -a +zR = :unfold -a + = :fold -t + +zz = :align center +zt = :align top +zb = :align bottom + + = :view +d = :choose -o y 'Really delete this message' delete-message +D = :delete +a = :archive flat +A = :unmark -a:mark -T:archive flat + +C = :compose +m = :compose + +b = :bounce + +rr = :reply -a +rq = :reply -aq +Rr = :reply +Rq = :reply -q + +c = :cf +$ = :term +! = :term +| = :pipe + +/ = :search +\ = :filter +n = :next-result +N = :prev-result + = :clear + +s = :split +S = :vsplit + +pl = :patch list +pa = :patch apply +pd = :patch drop +pb = :patch rebase +pt = :patch term +ps = :patch switch + +[messages:folder=Drafts] + = :recall + +[view] +/ = :toggle-key-passthrough/ +q = :close +O = :open +o = :open +S = :save +| = :pipe +D = :delete +A = :archive flat + + = :open-link + +f = :forward +rr = :reply -a +rq = :reply -aq +Rr = :reply +Rq = :reply -q + +H = :toggle-headers + = :prev-part + = :prev-part + = :next-part + = :next-part +J = :next + = :next +K = :prev + = :prev + +[view::passthrough] +$noinherit = true +$ex = + = :toggle-key-passthrough + +[compose] +# Keybindings used when the embedded terminal is not selected in the compose +# view +$noinherit = true +$ex = +$complete = + = :prev-field + = :prev-field + = :next-field + = :next-field + = :switch-account -p + = :switch-account -p + = :switch-account -n + = :switch-account -n + = :next-field + = :prev-field + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab + +[compose::editor] +# Keybindings used when the embedded terminal is selected in the compose view +$noinherit = true +$ex = + = :prev-field + = :prev-field + = :next-field + = :next-field + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab + +[compose::review] +# Keybindings used when reviewing a message to be sent +# Inline comments are used as descriptions on the review screen +y = :send # Send +n = :abort # Abort (discard message, no confirmation) +v = :preview # Preview message +p = :postpone # Postpone +q = :choose -o d discard abort -o p postpone postpone # Abort or postpone +e = :edit # Edit +a = :attach # Add attachment +d = :detach # Remove attachment + +[terminal] +$noinherit = true +$ex = + + = :prev-tab + = :next-tab + = :prev-tab + = :next-tab diff --git a/home/modules/aerc/default.nix b/home/modules/aerc/default.nix new file mode 100644 index 0000000..83ad896 --- /dev/null +++ b/home/modules/aerc/default.nix @@ -0,0 +1,21 @@ +{ + programs.aerc = { + extraBinds = builtins.readFile ./binds.conf; # default binds + extraConfig = { + general = { + pgp-provider = "gpg"; + unsafe-accounts-conf = true; + }; + ui = {}; + viewer = {}; + filters = { + "text/plain" = "colorize"; + "text/calendar" = "calendar"; + "message/delivery-status" = "colorize"; + "message/rfc822" = "colorize"; + "image/*" = "img2sixel"; + "text/html" = "html | colorize"; + }; + }; + }; +} diff --git a/home/modules/email.nix b/home/modules/email.nix index 2cec84f..6b491c5 100644 --- a/home/modules/email.nix +++ b/home/modules/email.nix @@ -21,6 +21,8 @@ in { }; }; + imports = [./aerc/.]; + config = lib.mkIf cfg.enable { programs.scripts = [ { @@ -73,22 +75,6 @@ in { programs.aerc = { enable = cfg.terminal; - extraConfig = { - general = { - pgp-provider = "gpg"; - unsafe-accounts-conf = true; - }; - ui = {}; - viewer = {}; - filters = { - "text/plain" = "colorize"; - "text/calendar" = "calendar"; - "message/delivery-status" = "colorize"; - "message/rfc822" = "colorize"; - "image/*" = "img2sixel"; - "text/html" = "html | colorize"; - }; - }; }; }; } From 18005b81f73818660c820c1a5eed5cd533f31ca8 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 13 Aug 2024 07:54:35 +0100 Subject: [PATCH 24/65] nixbook: add mongoms --- home/programs/graphical.nix | 1 - home/programs/work.nix | 16 ++++++++-------- nixos/modules/work.nix | 5 +++++ pkgs/mongodb.nix | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 pkgs/mongodb.nix diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 342376f..70bc7d2 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -37,7 +37,6 @@ brave vieb bitwarden - logseq ]; xdg.mimeApps.defaultApplications = { diff --git a/home/programs/work.nix b/home/programs/work.nix index 491fe5c..ac820fb 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -4,6 +4,7 @@ ... }: let modifier = config.windowManager.modifierKey; + browser = "${pkgs.brave}/opt/brave.com/brave/brave-browser"; pwa = { slack = "mpagibdhafmlkgpemeicgogjnhclenoc"; teams = "cifhbcnohmdccbgoicgdjpfamggdegmo"; @@ -15,19 +16,17 @@ in { terminal = false; }; - home.packages = with pkgs; [ - thunderbird - remmina - devcontainer + home.packages = [ + pkgs.thunderbird + pkgs.remmina + pkgs.devcontainer (import ../../lib/mkapp.nix "slack" { - inherit pkgs; + inherit pkgs browser; desktopName = "Slack"; app-id = pwa.slack; - browser = "${brave}/opt/brave.com/brave/brave-browser"; }) (import ../../lib/mkapp.nix "teams" { - inherit pkgs; - browser = "${brave}/opt/brave.com/brave/brave-browser"; + inherit pkgs browser; app-id = pwa.teams; desktopName = "Microsoft Teams"; }) @@ -36,6 +35,7 @@ in { home.sessionVariables = { CYPRESS_INSTALL_BINARY = 0; CYPRESS_RUN_BINARY = "${pkgs.cypress}/bin/Cypress"; + MONGOMS_SYSTEM_BINARY = "${pkgs.callPackage ../../pkgs/mongodb.nix pkgs}/bin/mongod"; }; gtk.gtk3.bookmarks = [ diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index bb94cf9..bd1427f 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -13,6 +13,11 @@ in { "steam-run" ]; + nixpkgs.config.permittedInsecurePackages = [ + "openssl-1.1.1w" # required for mongodb + ]; + + networking = { networkmanager = { plugins = [pkgs.networkmanager-openvpn]; diff --git a/pkgs/mongodb.nix b/pkgs/mongodb.nix new file mode 100644 index 0000000..6900602 --- /dev/null +++ b/pkgs/mongodb.nix @@ -0,0 +1,32 @@ +{stdenv, pkgs, ...}: +let + version = "6.0.14"; +in + stdenv.mkDerivation { + name = "mongodb"; + inherit version; + + src = builtins.fetchTarball { + url = "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian11-${version}.tgz"; + sha256 = "sha256:0lghfh8dpq159y2m0b7wg3xks2s59n9s5xmcw6ng2lrg815s6aiz"; + }; + dontBuild = true; + + nativeBuildInputs = with pkgs; [ + openssl_1_1 + xz + curl + libgcc + autoPatchelfHook + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp -R bin $out/ + + runHook postInstall + ''; + } + From a135410aabdf903044547c5ae1bd0e0d0615fe26 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 13 Aug 2024 08:20:20 +0100 Subject: [PATCH 25/65] zenix: setup cosmic but break nixvim --- flake.lock | 96 ++++++++++++++++++++------------ flake.nix | 11 +++- home/programs/neovim/default.nix | 10 ++-- nixos/workstation.nix | 5 ++ 4 files changed, 78 insertions(+), 44 deletions(-) diff --git a/flake.lock b/flake.lock index 5a73c77..062457b 100644 --- a/flake.lock +++ b/flake.lock @@ -189,11 +189,11 @@ ] }, "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", "type": "github" }, "original": { @@ -253,11 +253,11 @@ ] }, "locked": { - "lastModified": 1721042469, - "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", + "lastModified": 1722857853, + "narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", + "rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da", "type": "github" }, "original": { @@ -312,11 +312,11 @@ ] }, "locked": { - "lastModified": 1722630065, - "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", + "lastModified": 1723015306, + "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", "owner": "nix-community", "repo": "home-manager", - "rev": "afc892db74d65042031a093adb6010c4c3378422", + "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", "type": "github" }, "original": { @@ -334,11 +334,11 @@ ] }, "locked": { - "lastModified": 1722407237, - "narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=", + "lastModified": 1722630065, + "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", "owner": "nix-community", "repo": "home-manager", - "rev": "58cef3796271aaeabaed98884d4abaab5d9d162d", + "rev": "afc892db74d65042031a093adb6010c4c3378422", "type": "github" }, "original": { @@ -376,11 +376,11 @@ ] }, "locked": { - "lastModified": 1722082646, - "narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", + "lastModified": 1722924007, + "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", + "rev": "91010a5613ffd7ee23ee9263213157a1c422b705", "type": "github" }, "original": { @@ -395,14 +395,15 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable", + "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1722648908, - "narHash": "sha256-yBHD6n75iXj8D3YonPf7k32N+m4UOUCW/Yq/+gYvadg=", + "lastModified": 1723258277, + "narHash": "sha256-2yB/905PCCFwFI20mRU7aAZdp1h7cYmsvlKk+t8+W20=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "5e56434064e3b3c8fb1d553322a0fbd04d2c277a", + "rev": "7f032a71bf9cb77df5610796c70f45e1f69a9a3a", "type": "github" }, "original": { @@ -413,11 +414,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722421184, - "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", + "lastModified": 1723175592, + "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", "type": "github" }, "original": { @@ -428,11 +429,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1722519197, - "narHash": "sha256-VEdJmVU2eLFtLqCjTYJd1J7+Go8idAcZoT11IewFiRg=", + "lastModified": 1722987190, + "narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "05405724efa137a0b899cce5ab4dde463b4fd30b", + "rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90", "type": "github" }, "original": { @@ -505,11 +506,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1722605918, - "narHash": "sha256-eWVY6hM2IlxRIVUgKBlPCX4pJ1Nmh3Nvw/Io2LaE0Y4=", + "lastModified": 1723230145, + "narHash": "sha256-FyjcuYZMqXdiKOXkHaIC2ubag+TPV9Z12urC/sdVI6A=", "owner": "nix-community", "repo": "nixvim", - "rev": "0bc169903705c94fda7934ecc27dd9038ad5f0e9", + "rev": "4852f94f8ccae551514df0092a077014bafb95ca", "type": "github" }, "original": { @@ -527,11 +528,11 @@ ] }, "locked": { - "lastModified": 1722144272, - "narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", + "lastModified": 1722772237, + "narHash": "sha256-3eCYmzeLngX8eutIsTZAG8DIvT/0DWQQxiszTQz8n0s=", "owner": "NuschtOS", "repo": "search", - "rev": "16565307c267ec219c2b5d3494ba66df08e7d403", + "rev": "aa5f6246565cc9b1e697d2c9d6ed2c842b17fff6", "type": "github" }, "original": { @@ -550,17 +551,38 @@ "stylix": "stylix" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1723170066, + "narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1722114803, - "narHash": "sha256-s6YhI8UHwQvO4cIFLwl1wZ1eS5Cuuw7ld2VzUchdFP0=", + "lastModified": 1722897572, + "narHash": "sha256-3m/iyyjCdRBF8xyehf59QlckIcmShyTesymSb+N4Ap4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "eb34eb588132d653e4c4925d862f1e5a227cc2ab", + "rev": "8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9", "type": "github" }, "original": { @@ -584,11 +606,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1722295291, - "narHash": "sha256-3XpT9GMw50NCGT1Gd2YAwEjrEcFtDqnuQ7sRUcuU/Pc=", + "lastModified": 1722946882, + "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", "owner": "danth", "repo": "stylix", - "rev": "feb2973dfa8232c07efbd2b48f11a5cfa2276570", + "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8c2f542..0c519ed 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,11 @@ }; }; + nixConfig = { + substituters = ["https://cosmic.cachix.org/"]; + trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; + }; + outputs = {nixvim, ...} @ inputs: let system = "x86_64-linux"; pkgs = import inputs.nixpkgs {inherit system;}; @@ -32,13 +37,15 @@ zenix = mkConf { nixos-modules = [ ./hardware/zenix.nix - (auto-login "Hyprland") - ./nixos/programs/hyprland.nix + # (auto-login "Hyprland") + # ./nixos/programs/hyprland.nix + ./nixos/programs/cosmic.nix ./nixos/programs/gamer.nix ./nixos/programs/personal.nix ./nixos/workstation.nix ]; home-modules = [ + ./home/workstation.nix ./home/programs/graphical.nix ./home/programs/gamer.nix ./home/programs/personal/. diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index dfbee38..10e37bf 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -1,9 +1,9 @@ {pkgs, ...}: { - programs.nixvim = - { - enable = true; - } - // import ../../../lib/nixvim.nix; + # programs.nixvim = + # { + # enable = true; + # } + # // import ../../../lib/nixvim.nix; programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; diff --git a/nixos/workstation.nix b/nixos/workstation.nix index dd667e0..1ab3a81 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -2,6 +2,7 @@ inputs, pkgs, lib, + config, ... }: { imports = [ @@ -70,4 +71,8 @@ nerdfonts interalia ]; + + home-manager.users.${config.user}.imports = [ + ../home/workstation.nix + ]; } From 8964da1663fe144b4274be88967cf8357d6cacd9 Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 14 Aug 2024 07:48:42 +0100 Subject: [PATCH 26/65] nixbook: install cosmic --- flake.lock | 66 ++++++++++++++++---------------- flake.nix | 16 ++++---- hardware/fcs-tristan-nixbook.nix | 1 - home/programs/neovim/default.nix | 10 ++--- 4 files changed, 46 insertions(+), 47 deletions(-) diff --git a/flake.lock b/flake.lock index 062457b..945fc01 100644 --- a/flake.lock +++ b/flake.lock @@ -253,11 +253,11 @@ ] }, "locked": { - "lastModified": 1722857853, - "narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=", + "lastModified": 1723202784, + "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da", + "rev": "c7012d0c18567c889b948781bc74a501e92275d1", "type": "github" }, "original": { @@ -312,11 +312,11 @@ ] }, "locked": { - "lastModified": 1723015306, - "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", "owner": "nix-community", "repo": "home-manager", - "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", "type": "github" }, "original": { @@ -334,11 +334,11 @@ ] }, "locked": { - "lastModified": 1722630065, - "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", "owner": "nix-community", "repo": "home-manager", - "rev": "afc892db74d65042031a093adb6010c4c3378422", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", "type": "github" }, "original": { @@ -399,11 +399,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1723258277, - "narHash": "sha256-2yB/905PCCFwFI20mRU7aAZdp1h7cYmsvlKk+t8+W20=", + "lastModified": 1723599342, + "narHash": "sha256-4eUNZxze/tMkKzfAJSS+o3o4LcMH1znWfCUICO/Sw4A=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "7f032a71bf9cb77df5610796c70f45e1f69a9a3a", + "rev": "5e861c29989be12691f90bda3a7b97891a629ed3", "type": "github" }, "original": { @@ -414,11 +414,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723175592, - "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", + "lastModified": 1723362943, + "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", + "rev": "a58bc8ad779655e790115244571758e8de055e3d", "type": "github" }, "original": { @@ -429,11 +429,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1722987190, - "narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=", + "lastModified": 1723556749, + "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90", + "rev": "4a92571f9207810b559c9eac203d1f4d79830073", "type": "github" }, "original": { @@ -506,11 +506,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1723230145, - "narHash": "sha256-FyjcuYZMqXdiKOXkHaIC2ubag+TPV9Z12urC/sdVI6A=", + "lastModified": 1723481641, + "narHash": "sha256-9djT72/Ab2E3SpUbB3l0WmqZQ5mj05+LIVoorcjCWgE=", "owner": "nix-community", "repo": "nixvim", - "rev": "4852f94f8ccae551514df0092a077014bafb95ca", + "rev": "dbf6f7bc997dc3a9ab1f014ea075600357226950", "type": "github" }, "original": { @@ -528,11 +528,11 @@ ] }, "locked": { - "lastModified": 1722772237, - "narHash": "sha256-3eCYmzeLngX8eutIsTZAG8DIvT/0DWQQxiszTQz8n0s=", + "lastModified": 1723367906, + "narHash": "sha256-v1qA4WBGDI2uH/TVqRwuXSBP341W681psbzYJ8zrjog=", "owner": "NuschtOS", "repo": "search", - "rev": "aa5f6246565cc9b1e697d2c9d6ed2c842b17fff6", + "rev": "6ca2c3ae05a915c160512bd41f6810f456c9b30d", "type": "github" }, "original": { @@ -559,11 +559,11 @@ ] }, "locked": { - "lastModified": 1723170066, - "narHash": "sha256-SFkQfOA+8AIYJsPlQtxNP+z5jRLfz91z/aOrV94pPmw=", + "lastModified": 1723515680, + "narHash": "sha256-nHdKymsHCVIh0Wdm4MvSgxcTTg34FJIYHRQkQYaSuvk=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "fecfe4d7c96fea2982c7907997b387a6b52c1093", + "rev": "4ee3d9e9569f70d7bb40f28804d6fe950c81eab3", "type": "github" }, "original": { @@ -578,11 +578,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1722897572, - "narHash": "sha256-3m/iyyjCdRBF8xyehf59QlckIcmShyTesymSb+N4Ap4=", + "lastModified": 1723501126, + "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9", + "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", "type": "github" }, "original": { @@ -642,11 +642,11 @@ ] }, "locked": { - "lastModified": 1722330636, - "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=", + "lastModified": 1723454642, + "narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "768acdb06968e53aa1ee8de207fd955335c754b7", + "rev": "349de7bc435bdff37785c2466f054ed1766173be", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0c519ed..c5186a0 100644 --- a/flake.nix +++ b/flake.nix @@ -18,10 +18,10 @@ }; }; - nixConfig = { - substituters = ["https://cosmic.cachix.org/"]; - trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; - }; + # nixConfig = { + # substituters = ["https://cosmic.cachix.org/"]; + # trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; + # }; outputs = {nixvim, ...} @ inputs: let system = "x86_64-linux"; @@ -45,7 +45,6 @@ ./nixos/workstation.nix ]; home-modules = [ - ./home/workstation.nix ./home/programs/graphical.nix ./home/programs/gamer.nix ./home/programs/personal/. @@ -56,12 +55,13 @@ FCS-Tristan-Nixbook = mkConf { nixos-modules = [ ./hardware/fcs-tristan-nixbook.nix - (auto-login "Hyprland") - ./nixos/hyprland.nix + # (auto-login "Hyprland") + # ./nixos/programs/hyprland.nix + ./nixos/workstation.nix ./nixos/modules/work.nix + ./nixos/programs/cosmic.nix ]; home-modules = [ - ./home/desktop/hyprland/. ./home/programs/work.nix ./home/programs/graphical.nix ]; diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index e22cc1a..2d6d179 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -103,5 +103,4 @@ in { } ]; - services.tlp.enable = true; } diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index 10e37bf..dfbee38 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -1,9 +1,9 @@ {pkgs, ...}: { - # programs.nixvim = - # { - # enable = true; - # } - # // import ../../../lib/nixvim.nix; + programs.nixvim = + { + enable = true; + } + // import ../../../lib/nixvim.nix; programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; From 24de630982597e8304673a7bcd789fdc1a556d83 Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 14 Aug 2024 19:49:52 +0100 Subject: [PATCH 27/65] nixbook: nixvim fixes, add devcontainer script --- flake.lock | 32 +++++++++++++++++++++++--------- flake.nix | 5 ----- home/programs/neovim/default.nix | 2 +- home/programs/work.nix | 14 +++++++++++++- lib/nixvim.nix | 17 +++++++---------- 5 files changed, 44 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index 945fc01..91ec14e 100644 --- a/flake.lock +++ b/flake.lock @@ -460,6 +460,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1723362943, + "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a58bc8ad779655e790115244571758e8de055e3d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1721466660, "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", @@ -475,7 +491,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1714912032, "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", @@ -499,18 +515,16 @@ "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_2", "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1723481641, - "narHash": "sha256-9djT72/Ab2E3SpUbB3l0WmqZQ5mj05+LIVoorcjCWgE=", + "lastModified": 1723634417, + "narHash": "sha256-5M5fjJn02iOZN5z3zM/95l28kC0zjKCkId5JJ9J63fE=", "owner": "nix-community", "repo": "nixvim", - "rev": "dbf6f7bc997dc3a9ab1f014ea075600357226950", + "rev": "cb398ce4ba243c7a3a8d1fbfea1b56a44de6b3c9", "type": "github" }, "original": { @@ -574,7 +588,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -603,7 +617,7 @@ "flake-compat": "flake-compat_3", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1722946882, diff --git a/flake.nix b/flake.nix index c5186a0..8fae4e1 100644 --- a/flake.nix +++ b/flake.nix @@ -18,11 +18,6 @@ }; }; - # nixConfig = { - # substituters = ["https://cosmic.cachix.org/"]; - # trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; - # }; - outputs = {nixvim, ...} @ inputs: let system = "x86_64-linux"; pkgs = import inputs.nixpkgs {inherit system;}; diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index dfbee38..4e99ede 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -3,7 +3,7 @@ { enable = true; } - // import ../../../lib/nixvim.nix; + // ( import ../../../lib/nixvim.nix {inherit pkgs;} ); programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; diff --git a/home/programs/work.nix b/home/programs/work.nix index ac820fb..4b26bc1 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -19,7 +19,6 @@ in { home.packages = [ pkgs.thunderbird pkgs.remmina - pkgs.devcontainer (import ../../lib/mkapp.nix "slack" { inherit pkgs browser; desktopName = "Slack"; @@ -30,6 +29,19 @@ in { app-id = pwa.teams; desktopName = "Microsoft Teams"; }) + pkgs.devcontainer + (pkgs.writeShellScriptBin "devcontainer-open" (let + jq = "${pkgs.jq}/bin/jq"; + devcontainer = "${pkgs.devcontainer}/bin/devcontainer"; + in '' + res=$(${devcontainer} up --workspace-folder .) + outcome=$(echo $res | ${jq} -r '.outcome') + [[ $outcome = "success" ]] || exit 1 + containerId=$(echo $res | ${jq} -r '.containerId') + remoteWorkspaceFolder=$(echo $res | ${jq} -r '.remoteWorkspaceFolder') + docker exec -it --workdir=$remoteWorkspaceFolder $containerId bash + '')) + ]; home.sessionVariables = { diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 75ef7a0..dd646ec 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -1,4 +1,4 @@ -{ +{pkgs, ...}: { globals = { mapleader = " "; }; @@ -36,22 +36,22 @@ options.desc = "close buffer"; } { - key = "ggs"; + key = "gs"; action = ":Gitsigns stage_hunk"; options.desc = "git stage hunk"; } { - key = "ggr"; - action = ":LazyGit"; + key = "gr"; + action = ":Gitsigns reset_hunk"; options.desc = "git restore hunk"; } { - key = "ggb"; + key = "gb"; action = ":Gitsigns blame"; options.desc = "show git blame"; } { - key = "ggg"; + key = "gg"; action = ":LazyGit"; options.desc = "open lazy git"; } @@ -63,7 +63,6 @@ comment.enable = true; markdown-preview.enable = true; - treesitter.enable = true; telescope = { enable = true; @@ -81,7 +80,7 @@ enable = true; servers = { tsserver.enable = true; - nixd.enable = true; + nil-ls.enable = true; }; keymaps = { lspBuf = { @@ -111,8 +110,6 @@ cmp-nvim-lsp.enable = true; cmp-path.enable = true; - ts-autotag.enable = true; - gitsigns.enable = true; git-worktree = { enable = true; From f478715f4b4a9a0dca30b3d4f8ee13006c952e53 Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 16 Aug 2024 16:27:12 +0100 Subject: [PATCH 28/65] nixbook: expose pw scripts and add bare git clone alias --- flake.lock | 26 ++++++-------------------- home/programs/git.nix | 21 ++++++++++++++++++++- home/programs/scripts.nix | 5 +---- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index 91ec14e..0058626 100644 --- a/flake.lock +++ b/flake.lock @@ -460,22 +460,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1723362943, - "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a58bc8ad779655e790115244571758e8de055e3d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1721466660, "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", @@ -491,7 +475,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1714912032, "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", @@ -515,7 +499,9 @@ "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs" + ], "nuschtosSearch": "nuschtosSearch", "treefmt-nix": "treefmt-nix" }, @@ -588,7 +574,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -617,7 +603,7 @@ "flake-compat": "flake-compat_3", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1722946882, diff --git a/home/programs/git.nix b/home/programs/git.nix index ff6e6d2..cc5b7b7 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -1,4 +1,4 @@ -{ +{pkgs, ...}: { programs.git = { enable = true; aliases = { @@ -6,6 +6,25 @@ amend = "commit --amend --no-edit"; sdiff = "diff --staged"; t = "tag --annotate"; + bclone = "!sh ${pkgs.writeShellScriptBin "bare-clone" '' + url=$1 + basename=''${url##*/} + name=''${2:-''${basename%.*}} + + mkdir "$name" + + git clone --bare "$url" "$name/.bare" || { + rm -r "$name" + exit 1 + } + + cd "$name" + echo "gitdir: ./.bare" > .git + + git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + + git fetch origin + ''}/bin/bare-clone"; }; delta = { enable = true; diff --git a/home/programs/scripts.nix b/home/programs/scripts.nix index b4d8293..8673d76 100644 --- a/home/programs/scripts.nix +++ b/home/programs/scripts.nix @@ -55,14 +55,13 @@ in { echo "$items" | ${my-deps.menu} | xargs -I_ rbw get _ | wl-copy -n ''; hotkeys = [{key = "P";}]; - install = false; } { name = "bwusernamemenu"; text = '' items="$(rbw list)" echo "$items" | ${my-deps.menu} | xargs -I_ rbw get --field username _ \ - | awk '{print $2}' | wl-copy -n + | wl-copy -n ''; hotkeys = [ { @@ -70,7 +69,6 @@ in { key = "P"; } ]; - install = false; } { name = "bwotpmenu"; @@ -84,7 +82,6 @@ in { key = "P"; } ]; - install = false; } { name = "screenshot"; From c6cf7817cc1a214d501d0b699743ca6469d363c2 Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 24 Aug 2024 15:22:04 +0100 Subject: [PATCH 29/65] zenix: update --- flake.lock | 144 ++++++++++++++++++++++++++---------- home/programs/graphical.nix | 5 +- 2 files changed, 107 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index 0058626..5246a73 100644 --- a/flake.lock +++ b/flake.lock @@ -182,6 +182,28 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixos-cosmic", + "nix-update", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -253,11 +275,11 @@ ] }, "locked": { - "lastModified": 1723202784, - "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", + "lastModified": 1724227338, + "narHash": "sha256-TuSaYdhOxeaaE9885mFO1lZHHax33GD5A9dczJrGUjw=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "c7012d0c18567c889b948781bc74a501e92275d1", + "rev": "6cedaa7c1b4f82a266e5d30f212273e60d62cb0d", "type": "github" }, "original": { @@ -312,11 +334,11 @@ ] }, "locked": { - "lastModified": 1723399884, - "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "lastModified": 1724412708, + "narHash": "sha256-tLr1k+UZLVumyqXRU8E5lBtLjsvHSy8e2NiamfkjpYg=", "owner": "nix-community", "repo": "home-manager", - "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "rev": "b18f3ebc4029c22d437e3424014c8597a8b459a0", "type": "github" }, "original": { @@ -334,11 +356,11 @@ ] }, "locked": { - "lastModified": 1723399884, - "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "lastModified": 1723986931, + "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", "type": "github" }, "original": { @@ -376,11 +398,11 @@ ] }, "locked": { - "lastModified": 1722924007, - "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=", + "lastModified": 1724299755, + "narHash": "sha256-P5zMA17kD9tqiqMuNXwupkM7buM3gMNtoZ1VuJTRDE4=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "91010a5613ffd7ee23ee9263213157a1c422b705", + "rev": "a8968d88e5a537b0491f68ce910749cd870bdbef", "type": "github" }, "original": { @@ -389,9 +411,33 @@ "type": "github" } }, + "nix-update": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1724271552, + "narHash": "sha256-xn0dC4M3mfItxP+s3/v3Hz/CSKp74VH/gMfufKxl9/4=", + "owner": "Mic92", + "repo": "nix-update", + "rev": "737121eccb67542e8c004c64da833fede2e80c64", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-update", + "type": "github" + } + }, "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", + "nix-update": "nix-update", "nixpkgs": [ "nixpkgs" ], @@ -399,11 +445,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1723599342, - "narHash": "sha256-4eUNZxze/tMkKzfAJSS+o3o4LcMH1znWfCUICO/Sw4A=", + "lastModified": 1724431223, + "narHash": "sha256-m8K3mXCi6VypEMI3eirtChsaXBSJvKsoMwOXpuMqfZ4=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "5e861c29989be12691f90bda3a7b97891a629ed3", + "rev": "f4ecea2443e7905f01d06b9a00c3219c0c7799ff", "type": "github" }, "original": { @@ -414,11 +460,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723362943, - "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a58bc8ad779655e790115244571758e8de055e3d", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", "type": "github" }, "original": { @@ -429,11 +475,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1723556749, - "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", + "lastModified": 1724242322, + "narHash": "sha256-HMpK7hNjhEk4z5SFg5UtxEio9OWFocHdaQzCfW1pE7w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a92571f9207810b559c9eac203d1f4d79830073", + "rev": "224042e9a3039291f22f4f2ded12af95a616cca0", "type": "github" }, "original": { @@ -495,7 +541,7 @@ "inputs": { "devshell": "devshell", "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -503,14 +549,14 @@ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1723634417, - "narHash": "sha256-5M5fjJn02iOZN5z3zM/95l28kC0zjKCkId5JJ9J63fE=", + "lastModified": 1724428221, + "narHash": "sha256-4rPf+K59pqQeWSf5pBeuuvMBJ6XrF7x84Ezinzb8C0I=", "owner": "nix-community", "repo": "nixvim", - "rev": "cb398ce4ba243c7a3a8d1fbfea1b56a44de6b3c9", + "rev": "9033f1cf2d46da308cb38e258f82fed2e6da7310", "type": "github" }, "original": { @@ -528,11 +574,11 @@ ] }, "locked": { - "lastModified": 1723367906, - "narHash": "sha256-v1qA4WBGDI2uH/TVqRwuXSBP341W681psbzYJ8zrjog=", + "lastModified": 1723969429, + "narHash": "sha256-BuewfNEXEf11MIkJY+uvWsdLu1dIvgJqntWChvNdALg=", "owner": "NuschtOS", "repo": "search", - "rev": "6ca2c3ae05a915c160512bd41f6810f456c9b30d", + "rev": "a05d1805f2a2bc47d230e5e92aecbf69f784f3d0", "type": "github" }, "original": { @@ -559,11 +605,11 @@ ] }, "locked": { - "lastModified": 1723515680, - "narHash": "sha256-nHdKymsHCVIh0Wdm4MvSgxcTTg34FJIYHRQkQYaSuvk=", + "lastModified": 1724293269, + "narHash": "sha256-x/XhOAszT/ejditCHUtGOjQcVg2AQhrC/QVew3i7kTI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "4ee3d9e9569f70d7bb40f28804d6fe950c81eab3", + "rev": "6dc6d34a3a217457d7044dcce32b6d537480a6a1", "type": "github" }, "original": { @@ -606,11 +652,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1722946882, - "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", + "lastModified": 1724260414, + "narHash": "sha256-EP1yFDEm/f7+j+fE3TI7KZb5xJH6KNMtmlZciktC71c=", "owner": "danth", "repo": "stylix", - "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", + "rev": "c5f8f06543b70248a076f888177c7362a24d5dcc", "type": "github" }, "original": { @@ -635,6 +681,28 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixos-cosmic", + "nix-update", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719887753, + "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixvim", @@ -642,11 +710,11 @@ ] }, "locked": { - "lastModified": 1723454642, - "narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=", + "lastModified": 1723808491, + "narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "349de7bc435bdff37785c2466f054ed1766173be", + "rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a", "type": "github" }, "original": { diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 0b990fc..63cd230 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -29,8 +29,7 @@ shortwave # other - nheko - cinny-desktop + # nheko brave bitwarden ]; @@ -59,6 +58,4 @@ "file:///home/tristan/Downloads" ]; }; - - programs.librewolf.enable = true; } From a30f8807eb55e162ca6b0857213aa13a8ea9e1ce Mon Sep 17 00:00:00 2001 From: Tristan Date: Mon, 9 Sep 2024 13:17:19 +0100 Subject: [PATCH 30/65] nixbook: update --- flake.lock | 214 +++++++++++++++++++++++++++--------- home/programs/graphical.nix | 3 +- lib/nixvim.nix | 2 +- 3 files changed, 162 insertions(+), 57 deletions(-) diff --git a/flake.lock b/flake.lock index 0058626..b4f0644 100644 --- a/flake.lock +++ b/flake.lock @@ -182,6 +182,28 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixos-cosmic", + "nix-update", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -220,6 +242,27 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -253,11 +296,11 @@ ] }, "locked": { - "lastModified": 1723202784, - "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", + "lastModified": 1724857454, + "narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "c7012d0c18567c889b948781bc74a501e92275d1", + "rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6", "type": "github" }, "original": { @@ -312,11 +355,11 @@ ] }, "locked": { - "lastModified": 1723399884, - "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "lastModified": 1725863684, + "narHash": "sha256-HmdTBpuCsw35Ii35JUKO6AE6nae+kJliQb0XGd4hoLE=", "owner": "nix-community", "repo": "home-manager", - "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "rev": "be47a2bdf278c57c2d05e747a13ed31cef54a037", "type": "github" }, "original": { @@ -334,11 +377,11 @@ ] }, "locked": { - "lastModified": 1723399884, - "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -355,11 +398,11 @@ ] }, "locked": { - "lastModified": 1715930644, - "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -376,11 +419,11 @@ ] }, "locked": { - "lastModified": 1722924007, - "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=", + "lastModified": 1724561770, + "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "91010a5613ffd7ee23ee9263213157a1c422b705", + "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e", "type": "github" }, "original": { @@ -389,9 +432,33 @@ "type": "github" } }, + "nix-update": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1725635983, + "narHash": "sha256-haSfwdurfltqQ/7YEmDcmWLnWwvAgelIHnXsHG34P1k=", + "owner": "lilyinstarlight", + "repo": "nix-update", + "rev": "ed54a7546affb3f8c9c3e10a6fa6fdb21756ec8f", + "type": "github" + }, + "original": { + "owner": "lilyinstarlight", + "repo": "nix-update", + "type": "github" + } + }, "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", + "nix-update": "nix-update", "nixpkgs": [ "nixpkgs" ], @@ -399,11 +466,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1723599342, - "narHash": "sha256-4eUNZxze/tMkKzfAJSS+o3o4LcMH1znWfCUICO/Sw4A=", + "lastModified": 1725845699, + "narHash": "sha256-kbl/Gnll6Cgyk3S2+Je9dbabBBNdB/dKCUcQiXLi1lw=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "5e861c29989be12691f90bda3a7b97891a629ed3", + "rev": "b0b8a91e3c15780ec98025dd71a560c0a2c7582c", "type": "github" }, "original": { @@ -414,11 +481,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723362943, - "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a58bc8ad779655e790115244571758e8de055e3d", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "type": "github" }, "original": { @@ -429,11 +496,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1723556749, - "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", + "lastModified": 1725693463, + "narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a92571f9207810b559c9eac203d1f4d79830073", + "rev": "68e7dce0a6532e876980764167ad158174402c6f", "type": "github" }, "original": { @@ -445,11 +512,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1721524707, - "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", + "lastModified": 1725762081, + "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", + "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05", "type": "github" }, "original": { @@ -461,11 +528,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1721466660, - "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", + "lastModified": 1725534445, + "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100", + "rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39", "type": "github" }, "original": { @@ -477,11 +544,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1714912032, - "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", + "lastModified": 1725194671, + "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee4a6e0f566fe5ec79968c57a9c2c3c25f2cf41d", + "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", "type": "github" }, "original": { @@ -495,7 +562,7 @@ "inputs": { "devshell": "devshell", "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -503,14 +570,14 @@ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1723634417, - "narHash": "sha256-5M5fjJn02iOZN5z3zM/95l28kC0zjKCkId5JJ9J63fE=", + "lastModified": 1725851942, + "narHash": "sha256-x2Z87jW80OV3gBtf53lHZSwZSUI7aDx7lh6hFMNlutM=", "owner": "nix-community", "repo": "nixvim", - "rev": "cb398ce4ba243c7a3a8d1fbfea1b56a44de6b3c9", + "rev": "6df273540c1ec51b484fab65988761ae877c6a62", "type": "github" }, "original": { @@ -528,11 +595,11 @@ ] }, "locked": { - "lastModified": 1723367906, - "narHash": "sha256-v1qA4WBGDI2uH/TVqRwuXSBP341W681psbzYJ8zrjog=", + "lastModified": 1724584782, + "narHash": "sha256-7FfHv7b1jwMPSu9SPY9hdxStk8E6EeSwzqdvV69U4BM=", "owner": "NuschtOS", "repo": "search", - "rev": "6ca2c3ae05a915c160512bd41f6810f456c9b30d", + "rev": "5a08d691de30b6fc28d58ce71a5e420f2694e087", "type": "github" }, "original": { @@ -559,11 +626,11 @@ ] }, "locked": { - "lastModified": 1723515680, - "narHash": "sha256-nHdKymsHCVIh0Wdm4MvSgxcTTg34FJIYHRQkQYaSuvk=", + "lastModified": 1725762472, + "narHash": "sha256-thdxLVdcfrJNMFV3Ej9mDIh6QgHyoYswiW0SFNwod8A=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "4ee3d9e9569f70d7bb40f28804d6fe950c81eab3", + "rev": "57a1564c924ee4acbffe0ad3d65c7e90d3e77cd8", "type": "github" }, "original": { @@ -578,11 +645,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1723501126, - "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", + "lastModified": 1725765163, + "narHash": "sha256-rfd2c47iVSFI6bRYy5l8wRijRBaYDeU7dM8XCDUGqlA=", "owner": "Mic92", "repo": "sops-nix", - "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", + "rev": "b68757cd2c3fa66d6ccaa0d046ce42a9324e0070", "type": "github" }, "original": { @@ -601,16 +668,18 @@ "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_3", + "systems": "systems_2" }, "locked": { - "lastModified": 1722946882, - "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", + "lastModified": 1725290973, + "narHash": "sha256-+jwXF9KI0HfvDgpsoJGvOdfOGGSKOrID1wQB79zjUbo=", "owner": "danth", "repo": "stylix", - "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", + "rev": "ef81ad9e85e60420cc83d4642619c14b57139d33", "type": "github" }, "original": { @@ -634,7 +703,44 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixos-cosmic", + "nix-update", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719887753, + "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixvim", @@ -642,11 +748,11 @@ ] }, "locked": { - "lastModified": 1723454642, - "narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=", + "lastModified": 1724833132, + "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "349de7bc435bdff37785c2466f054ed1766173be", + "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", "type": "github" }, "original": { diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 0b990fc..7ad5dfa 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -29,12 +29,11 @@ shortwave # other - nheko - cinny-desktop brave bitwarden ]; + xdg.mimeApps.defaultApplications = { "application/pdf" = "sioyek.desktop"; }; diff --git a/lib/nixvim.nix b/lib/nixvim.nix index dd646ec..ea21873 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -85,7 +85,7 @@ keymaps = { lspBuf = { "K" = "hover"; - "a" = "code_action"; + "ca" = "code_action"; "gd" = "definition"; }; diagnostic = { From 1828a2f264127c4a24d2a9c13273f236b726538a Mon Sep 17 00:00:00 2001 From: Tristan Date: Thu, 26 Sep 2024 14:02:58 +0100 Subject: [PATCH 31/65] nibook: add lazygit and element, vscode formatting --- home/default.nix | 1 + home/programs/graphical.nix | 1 + home/programs/vscode.nix | 3 +++ 3 files changed, 5 insertions(+) diff --git a/home/default.nix b/home/default.nix index 6b72153..6d7549f 100644 --- a/home/default.nix +++ b/home/default.nix @@ -39,6 +39,7 @@ tree ansible ytfzf + lazygit ]; programs.zoxide.enable = true; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 7ad5dfa..628070d 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -29,6 +29,7 @@ shortwave # other + element-desktop brave bitwarden ]; diff --git a/home/programs/vscode.nix b/home/programs/vscode.nix index 86d8cfc..5be9d65 100644 --- a/home/programs/vscode.nix +++ b/home/programs/vscode.nix @@ -19,6 +19,9 @@ in { "gitlens.telemetry.enabled" = false; "redhat.telemetry.enabled" = false; "cSpell.language" = "en,en-GB"; + "[typescript]" = { + "editor.defaultFormatter" = "vscode.typescript-language-features"; + }; }; }; From 5dc7980032fbc2d8dc412df5300cc821a731b661 Mon Sep 17 00:00:00 2001 From: Tristan Date: Thu, 26 Sep 2024 18:42:06 +0100 Subject: [PATCH 32/65] nixbook: update and fix nixvim --- flake.lock | 260 ++++++++++++++++++------------------------------- lib/nixvim.nix | 56 ++++++++--- 2 files changed, 139 insertions(+), 177 deletions(-) diff --git a/flake.lock b/flake.lock index b4f0644..4447c82 100644 --- a/flake.lock +++ b/flake.lock @@ -34,30 +34,14 @@ "type": "github" } }, - "base16-foot": { - "flake": false, - "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", - "owner": "tinted-theming", - "repo": "base16-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-foot", - "type": "github" - } - }, "base16-helix": { "flake": false, "locked": { - "lastModified": 1720809814, - "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", "type": "github" }, "original": { @@ -66,38 +50,6 @@ "type": "github" } }, - "base16-kitty": { - "flake": false, - "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", - "owner": "kdrag0n", - "repo": "base16-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", - "type": "github" - }, - "original": { - "owner": "kdrag0n", - "repo": "base16-kitty", - "type": "github" - } - }, - "base16-tmux": { - "flake": false, - "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", - "owner": "tinted-theming", - "repo": "base16-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-tmux", - "type": "github" - } - }, "base16-vim": { "flake": false, "locked": { @@ -182,28 +134,6 @@ } }, "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nixos-cosmic", - "nix-update", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -211,11 +141,11 @@ ] }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "type": "github" }, "original": { @@ -229,11 +159,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -296,11 +226,11 @@ ] }, "locked": { - "lastModified": 1724857454, - "narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=", + "lastModified": 1726745158, + "narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6", + "rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74", "type": "github" }, "original": { @@ -355,11 +285,11 @@ ] }, "locked": { - "lastModified": 1725863684, - "narHash": "sha256-HmdTBpuCsw35Ii35JUKO6AE6nae+kJliQb0XGd4hoLE=", + "lastModified": 1727346017, + "narHash": "sha256-z7OCFXXxIseJhEHiCkkUOkYxD9jtLU8Kf5Q9WC0SjJ8=", "owner": "nix-community", "repo": "home-manager", - "rev": "be47a2bdf278c57c2d05e747a13ed31cef54a037", + "rev": "c124568e1054a62c20fbe036155cc99237633327", "type": "github" }, "original": { @@ -377,11 +307,11 @@ ] }, "locked": { - "lastModified": 1724435763, - "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", + "lastModified": 1726985855, + "narHash": "sha256-NJPGK030Y3qETpWBhj9oobDQRbXdXOPxtu+YgGvZ84o=", "owner": "nix-community", "repo": "home-manager", - "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", + "rev": "04213d1ce4221f5d9b40bcee30706ce9a91d148d", "type": "github" }, "original": { @@ -419,11 +349,11 @@ ] }, "locked": { - "lastModified": 1724561770, - "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=", + "lastModified": 1727003835, + "narHash": "sha256-Cfllbt/ADfO8oxbT984MhPHR6FJBaglsr1SxtDGbpec=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e", + "rev": "bd7d1e3912d40f799c5c0f7e5820ec950f1e0b3d", "type": "github" }, "original": { @@ -432,33 +362,9 @@ "type": "github" } }, - "nix-update": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixos-cosmic", - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1725635983, - "narHash": "sha256-haSfwdurfltqQ/7YEmDcmWLnWwvAgelIHnXsHG34P1k=", - "owner": "lilyinstarlight", - "repo": "nix-update", - "rev": "ed54a7546affb3f8c9c3e10a6fa6fdb21756ec8f", - "type": "github" - }, - "original": { - "owner": "lilyinstarlight", - "repo": "nix-update", - "type": "github" - } - }, "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", - "nix-update": "nix-update", "nixpkgs": [ "nixpkgs" ], @@ -466,11 +372,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1725845699, - "narHash": "sha256-kbl/Gnll6Cgyk3S2+Je9dbabBBNdB/dKCUcQiXLi1lw=", + "lastModified": 1727314564, + "narHash": "sha256-UE98O6EQYUiDp7rypkBfJG0XSz0c5FxkslyP+7Gskt8=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "b0b8a91e3c15780ec98025dd71a560c0a2c7582c", + "rev": "f2aa34f521da1d6335301fc1b58dde8ed779d632", "type": "github" }, "original": { @@ -481,11 +387,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "lastModified": 1727122398, + "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093", "type": "github" }, "original": { @@ -496,11 +402,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1725693463, - "narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=", + "lastModified": 1727129439, + "narHash": "sha256-nPyrcFm6FSk7CxzVW4x2hu62aLDghNcv9dX6DF3dXw8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "68e7dce0a6532e876980764167ad158174402c6f", + "rev": "babc25a577c3310cce57c72d5bed70f4c3c3843a", "type": "github" }, "original": { @@ -562,7 +468,7 @@ "inputs": { "devshell": "devshell", "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -570,14 +476,14 @@ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix_2" + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1725851942, - "narHash": "sha256-x2Z87jW80OV3gBtf53lHZSwZSUI7aDx7lh6hFMNlutM=", + "lastModified": 1727328717, + "narHash": "sha256-tGEVv5mFs38m6+60fNKlZn/6ucoOotfwn9FikXiYSlk=", "owner": "nix-community", "repo": "nixvim", - "rev": "6df273540c1ec51b484fab65988761ae877c6a62", + "rev": "2ab8751b8be55accb78ca0ca58f1f4ff387001d7", "type": "github" }, "original": { @@ -595,11 +501,11 @@ ] }, "locked": { - "lastModified": 1724584782, - "narHash": "sha256-7FfHv7b1jwMPSu9SPY9hdxStk8E6EeSwzqdvV69U4BM=", + "lastModified": 1726995581, + "narHash": "sha256-lgsE/CTkZk9OIiFGEIrxXZQ7Feiv41dqlN7pEfTdgew=", "owner": "NuschtOS", "repo": "search", - "rev": "5a08d691de30b6fc28d58ce71a5e420f2694e087", + "rev": "3b7dd61b365ca45380707453758a45f2e9977be3", "type": "github" }, "original": { @@ -626,11 +532,11 @@ ] }, "locked": { - "lastModified": 1725762472, - "narHash": "sha256-thdxLVdcfrJNMFV3Ej9mDIh6QgHyoYswiW0SFNwod8A=", + "lastModified": 1727231386, + "narHash": "sha256-XLloPtQHKk/Tdt8t8zIb+JhmunlH3YB9Jz8RTlQ3N/4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "57a1564c924ee4acbffe0ad3d65c7e90d3e77cd8", + "rev": "b5f76c3b09a8194889f5328a480fbea1a9115518", "type": "github" }, "original": { @@ -645,11 +551,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1725765163, - "narHash": "sha256-rfd2c47iVSFI6bRYy5l8wRijRBaYDeU7dM8XCDUGqlA=", + "lastModified": 1726524647, + "narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "b68757cd2c3fa66d6ccaa0d046ce42a9324e0070", + "rev": "e2d404a7ea599a013189aa42947f66cede0645c8", "type": "github" }, "original": { @@ -662,24 +568,24 @@ "inputs": { "base16": "base16", "base16-fish": "base16-fish", - "base16-foot": "base16-foot", "base16-helix": "base16-helix", - "base16-kitty": "base16-kitty", - "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_3", - "systems": "systems_2" + "systems": "systems_2", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1725290973, - "narHash": "sha256-+jwXF9KI0HfvDgpsoJGvOdfOGGSKOrID1wQB79zjUbo=", + "lastModified": 1727355527, + "narHash": "sha256-qFSPHeImI00fBzGTA94D66HMD+fJDkuz04WHp2Sg8eA=", "owner": "danth", "repo": "stylix", - "rev": "ef81ad9e85e60420cc83d4642619c14b57139d33", + "rev": "993fcabd83d1e0ee5ea038b87041593cc73c1ebe", "type": "github" }, "original": { @@ -718,29 +624,55 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixos-cosmic", - "nix-update", - "nixpkgs" - ] - }, + "tinted-foot": { + "flake": false, "locked": { - "lastModified": 1719887753, - "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", "type": "github" }, "original": { - "owner": "numtide", - "repo": "treefmt-nix", + "owner": "tinted-theming", + "repo": "tinted-foot", "type": "github" } }, - "treefmt-nix_2": { + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1665001328, + "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "treefmt-nix": { "inputs": { "nixpkgs": [ "nixvim", @@ -748,11 +680,11 @@ ] }, "locked": { - "lastModified": 1724833132, - "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", + "lastModified": 1726734507, + "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", + "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f", "type": "github" }, "original": { diff --git a/lib/nixvim.nix b/lib/nixvim.nix index ea21873..aa0f2c2 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -13,8 +13,29 @@ undofile = true; }; + extraPlugins = [(pkgs.vimPlugins.actions-preview-nvim)]; extraConfigLua = '' vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo") + require("actions-preview").setup { + highlight_command = { + require("actions-preview.highlight").delta("${pkgs.delta}/bin/delta --no-gitconfig --side-by-side"), + }, + telescope = { + sorting_strategy = "ascending", + layout_strategy = "vertical", + layout_config = { + width = 0.8, + height = 0.9, + prompt_position = "top", + preview_cutoff = 20, + preview_height = function(_, _, max_lines) + return max_lines - 10 + end, + }, + }, + } + vim.keymap.set({ "v", "n" }, "", require("actions-preview").code_actions) + vim.keymap.set({ "n" }, "ca", require("actions-preview").code_actions) ''; keymaps = [ { @@ -22,6 +43,12 @@ action = ''"+y''; options.desc = "copy to clipboard"; } + { + key = "ca"; + action = '' + require("actions-preview").code_actions + ''; + } { key = "gl"; action = "g$"; @@ -59,7 +86,8 @@ plugins = { bufferline.enable = true; - surround.enable = true; + web-devicons.enable = true; + vim-surround.enable = true; comment.enable = true; markdown-preview.enable = true; @@ -79,25 +107,26 @@ lsp = { enable = true; servers = { - tsserver.enable = true; + ts-ls.enable = true; nil-ls.enable = true; }; keymaps = { lspBuf = { + "ck" = "hover"; "K" = "hover"; - "ca" = "code_action"; + + # using actions-preview instead + # "ca" = "code_action"; + # "" = "code_action"; + + "cd" = "definition"; "gd" = "definition"; - }; - diagnostic = { - "e" = "open_float"; - "ca" = "code_action"; - "" = "code_action"; + + "cf" = "references"; + "gr" = "references"; + "cr" = "rename"; - "gd" = "definition"; - }; - diagnostic = { - "ch" = "open_float"; - "" = "open_float"; + "" = "rename"; }; }; }; @@ -134,4 +163,5 @@ vim-css-color.enable = true; }; + } From 1a1d9f43f0e35b1829a086872851fb9029effe59 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 26 Sep 2024 18:43:51 +0100 Subject: [PATCH 33/65] zenix: nix store to separate drive --- flake.nix | 3 --- hardware/zenix.nix | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 8fae4e1..918ca2d 100644 --- a/flake.nix +++ b/flake.nix @@ -32,8 +32,6 @@ zenix = mkConf { nixos-modules = [ ./hardware/zenix.nix - # (auto-login "Hyprland") - # ./nixos/programs/hyprland.nix ./nixos/programs/cosmic.nix ./nixos/programs/gamer.nix ./nixos/programs/personal.nix @@ -43,7 +41,6 @@ ./home/programs/graphical.nix ./home/programs/gamer.nix ./home/programs/personal/. - ./home/programs/xr.nix ]; }; diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 8702d8b..8e7dde2 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -25,6 +25,13 @@ in { options = ["subvol=@" "compress=zstd" "autodefrag"]; }; + fileSystems."/nix" = { + device = "/dev/disk/by-label/nix"; + fsType = "f2fs"; + neededForBoot = true; + options = [ "noatime" ]; + }; + boot.initrd.postDeviceCommands = pkgs.lib.mkBefore (decrypt { keydevice = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; keypartname = "usbkey"; From 90651a4c30ce9c4e6cd19e7b0953bdaae9e7752b Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 1 Oct 2024 00:05:06 +0100 Subject: [PATCH 34/65] zenix: test cosmic home-manager module --- flake.lock | 54 +++++++-- flake.nix | 3 + home/desktop/cosmic/default.nix | 208 ++++++++++++++++++++++++++++++++ home/programs/lf/default.nix | 1 + nixos/programs/cosmic.nix | 7 +- 5 files changed, 263 insertions(+), 10 deletions(-) create mode 100644 home/desktop/cosmic/default.nix diff --git a/flake.lock b/flake.lock index 4447c82..f03dd3b 100644 --- a/flake.lock +++ b/flake.lock @@ -299,6 +299,25 @@ "type": "github" } }, + "home-manager-cosmic": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1727725142, + "narHash": "sha256-VHM8iZb1y/y0gOGD6Q/4Yey0OHczLrBNp6BLBiDwWFU=", + "owner": "tristanbeedell", + "repo": "home-manager", + "rev": "ed1eed53419d49d7de94e34678e3261dbdd07dfd", + "type": "github" + }, + "original": { + "owner": "tristanbeedell", + "ref": "cosmic", + "repo": "home-manager", + "type": "github" + } + }, "home-manager_2": { "inputs": { "nixpkgs": [ @@ -387,17 +406,18 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727122398, - "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", + "lastModified": 1722185531, + "narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093", + "rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "NixOS", "ref": "nixos-unstable", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-stable": { @@ -433,6 +453,21 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1727122398, + "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1725534445, "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=", @@ -448,7 +483,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -517,8 +552,9 @@ "root": { "inputs": { "home-manager": "home-manager", + "home-manager-cosmic": "home-manager-cosmic", "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", "sops-nix": "sops-nix", "stylix": "stylix" @@ -547,7 +583,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -574,7 +610,7 @@ "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", diff --git a/flake.nix b/flake.nix index 918ca2d..060f1ce 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,9 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager-cosmic = { + url = "github:tristanbeedell/home-manager/cosmic"; + }; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix new file mode 100644 index 0000000..d87403b --- /dev/null +++ b/home/desktop/cosmic/default.nix @@ -0,0 +1,208 @@ +{pkgs, config, ...}: let + bind = mods: key: action: { + modifiers = ["Super"] ++ mods; + inherit key action; + }; + _action = type: value: { + inherit type value; + }; + Actions = (enum [ + # Close the active window + "Close" + + # Show a debug overlay if enabled in the compositor build + "Debug" + + # Disable a default shortcut binding + "Disable" + + # Change focus to the last workspace + "LastWorkspace" + + # Maximize the active window + "Maximize" + + # Migrate the active workspace to the next output + "MigrateWorkspaceToNextOutput" + + # Migrate the active workspace to the previous output + "MigrateWorkspaceToPreviousOutput" + + # Minimize the active window + "Minimize" + + # Move a window to the last workspace + "MoveToLastWorkspace" + + # Move a window to the next output + "MoveToNextOutput" + + # Move a window to the next workspace + "MoveToNextWorkspace" + + # Move a window to the previous output + "MoveToPreviousOutput" + + # Move a window to the previous workspace + "MoveToPreviousWorkspace" + + # Change focus to the next output + "NextOutput" + + # Change focus to the next workspace + "NextWorkspace" + + # Change focus to the previous output + "PreviousOutput" + + # Change focus to the previous workspace + "PreviousWorkspace" + + # Move a window to the last workspace + "SendToLastWorkspace" + + # Move a window to the next output + "SendToNextOutput" + + # Move a window to the next workspace + "SendToNextWorkspace" + + # Move a window to the previous output + "SendToPreviousOutput" + + # Move a window to the previous workspace + "SendToPreviousWorkspace" + + # Swap positions of the active window with another + "SwapWindow" + + # Stop the compositor + "Terminate" + + # Toggle the orientation of a tiling group + "ToggleOrientation" + + # Toggle window stacking for the active window + "ToggleStacking" + + # Toggle the sticky state of the active window + "ToggleSticky" + + # Toggle tiling mode of the active workspace + "ToggleTiling" + + # Toggle between tiling and floating window states for the active window + "ToggleWindowFloating" + + ]) // { + + # Change focus to the window or workspace in the given direction + "Focus" = FocusDirection: _action "Focus" FocusDirection; + # Migrate the active workspace to the output in the given direction + "MigrateWorkspaceToOutput" = Direction: _action "MigrateWorkspaceToOutput" Direction; + # Move a window in the given direction + Move = Direction: _action "Move" Direction; + # Move a window to the given output + MoveToOutput = Direction: _action "MoveToOutput" Direction; + # Move a window to the given workspace + MoveToWorkspace = u8: _action "MoveToWorkspace" u8; + # Change the orientation of a tiling group + Orientation = Orientation: _action "Orientation" Orientation; + # Resize the active window in a given direction + Resizing = ResizeDirection: _action "Resizing" ResizeDirection; + # Move a window to the output in the given direction + SendToOutput = Direction: _action "SendToOutput" Direction; + # Move a window to the given workspace + SendToWorkspace = u8: _action "SendToWorkspace" u8; + # Move to an output in the given direction + SwitchOutput = Direction: _action "SwitchOutput" Direction; + # Perform a common system operation + System = System: _action "System" System; + # Execute a command with any given arguments + Spawn = String: _action "Spawn" String; + # Change focus to the given workspace ID + Workspace = u8: _action "Workspace" u8; + + }; + + Modifiers = enum [ + "Super" + "Ctrl" + "Alt" + "Shift" + ]; + + enum = builtins.foldl' (acc: el: {${el}=el;} // acc) {}; + +in with Modifiers; { + programs.cosmic = { + enable = true; + defaultKeybindings = false; + keybindings = [ +# Navigation + (bind [Super] "h" (Actions.Focus "Left")) + (bind [Super] "l" (Actions.Focus "Right")) + (bind [Super] "j" (Actions.Focus "Down")) + (bind [Super] "k" (Actions.Focus "Up")) + (bind [Super Shift] "h" (Actions.Move "Left")) + (bind [Super Shift] "l" (Actions.Move "Right")) + (bind [Super Shift] "j" (Actions.Move "Down")) + (bind [Super Shift] "k" (Actions.Move "Up")) + + (bind [Super] "1" (Actions.Workspace 1)) + (bind [Super] "2" (Actions.Workspace 2)) + (bind [Super] "3" (Actions.Workspace 3)) + (bind [Super] "4" (Actions.Workspace 4)) + (bind [Super] "5" (Actions.Workspace 5)) + (bind [Super Shift] "1" (Actions.MoveToWorkspace 1)) + (bind [Super Shift] "2" (Actions.MoveToWorkspace 2)) + (bind [Super Shift] "3" (Actions.MoveToWorkspace 3)) + (bind [Super Shift] "4" (Actions.MoveToWorkspace 4)) + (bind [Super Shift] "5" (Actions.MoveToWorkspace 5)) + + (bind [Super] "Space" Actions.ToggleWindowFloating) + (bind [Super] "f" Actions.Maximize) + (bind [Super] "m" Actions.Minimize) + (bind [Super Shift] "x" Actions.Close) + + (bind [Super Shift] "v" Actions.ToggleStacking) + (bind [Super Shift] "y" Actions.ToggleSticky) +# System + (bind [Super] "d" (Actions.Spawn config.programs.menu.drunCommand)) + (bind [Super] "Return" (Actions.Spawn "${pkgs.alacritty}/bin/alacritty")) + (bind [Super] "o" (Actions.System "HomeFolder")) + (bind [Super Shift] "s" (Actions.Spawn "cosmic-screenshot")) + ]; + background = { + displays = { + all = { + source = ../../../images/nier2.jpg; + }; + }; + }; + panels = { + Panel = { + applets = { + start = [ "com.system76.CosmicAppletWorkspaces" ]; + center = [ "com.system76.CosmicAppList" ]; + end = [ + "com.system76.CosmicAppletTime" + "com.system76.CosmicAppletAudio" + "com.system76.CosmicAppletNotifications" + "com.system76.CosmicAppletMinimize" + "com.system76.CosmicAppletPower" + ]; + }; + }; + }; + settings = { + "com.system76.CosmicComp".options = { + autotile = true; + active_hint = true; + focus_follows_cursor = true; + focus_follows_cursor_delay = 0; + cursor_follows_focus = true; + }; + }; + }; +} diff --git a/home/programs/lf/default.nix b/home/programs/lf/default.nix index d63dc3b..a0b3a17 100644 --- a/home/programs/lf/default.nix +++ b/home/programs/lf/default.nix @@ -37,6 +37,7 @@ in { R = "drag"; "" = ":rename"; "" = "open-with"; + "" = ":reload"; }; programs.lf.extraConfig = '' set sixel true diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix index f343d5c..b5cbed6 100644 --- a/nixos/programs/cosmic.nix +++ b/nixos/programs/cosmic.nix @@ -1,4 +1,4 @@ -{inputs, ...}: { +{inputs, config, ...}: { imports = [ inputs.nixos-cosmic.nixosModules.default ]; @@ -8,4 +8,9 @@ }; services.desktopManager.cosmic.enable = true; services.displayManager.cosmic-greeter.enable = true; + services.system76-scheduler.enable = true; + home-manager.users.${config.user}.imports = [ + (import "${inputs.home-manager-cosmic}/modules/programs/cosmic/.") + ../../home/desktop/cosmic/. + ]; } From fbcb58a26bd52d891cf91f5f5eceb97559701326 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 1 Oct 2024 16:45:08 +0100 Subject: [PATCH 35/65] nixbook: remove decryption script, quiet boot --- hardware/fcs-tristan-nixbook.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index 2d6d179..17d970e 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -23,14 +23,17 @@ in { options = ["subvol=@" "compress=zstd" "autodefrag"]; }; - boot.initrd.postDeviceCommands = pkgs.lib.mkBefore (decrypt { - keydevice = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; - keypartname = "usbkey"; - }); + boot.initrd.luks.devices."usbkey" = { + device = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; + }; boot.initrd.luks.devices."cryptroot" = { device = "/dev/disk/by-uuid/570cc51f-bd5c-4bee-a18f-f6aabaf60881"; keyFileSize = 4096; + preOpenCommands = '' + mkdir -m 0755 -p /key + mount -n -t vfat -o ro /dev/mapper/usbkey /key + ''; keyFile = "/key/keyfile"; preLVM = false; }; @@ -54,6 +57,11 @@ in { swapDevices = [{device = "/swap/swapfile";}]; + boot.plymouth.enable = true; + boot.initrd.verbose = false; + boot.consoleLogLevel = 1; + boot.kernelParams = [ "quiet" "udev.log_level=3" ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction From ea689504976381a4de4781a35556b8523b7070f5 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 1 Oct 2024 22:25:12 +0100 Subject: [PATCH 36/65] nixvim: treesitter, oil and adjust keys --- .rgignore | 2 + lib/nixvim.nix | 131 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 110 insertions(+), 23 deletions(-) create mode 100644 .rgignore diff --git a/.rgignore b/.rgignore new file mode 100644 index 0000000..13ba0e2 --- /dev/null +++ b/.rgignore @@ -0,0 +1,2 @@ +lib/words.txt +flake.lock diff --git a/lib/nixvim.nix b/lib/nixvim.nix index aa0f2c2..3091902 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -5,17 +5,26 @@ opts = { number = true; relativenumber = true; - tabstop = 2; + tabstop = 4; shiftwidth = 2; expandtab = true; smartindent = true; scrolloff = 4; undofile = true; + undodir.__raw = ''vim.fn.expand("$HOME/.local/share/nvim/undo")''; + + list = true; + listchars = builtins.concatStringsSep "," [ + "tab: >" + "leadmultispace: |" + "trail:." + "extends:>" + "precedes:<" + ]; }; extraPlugins = [(pkgs.vimPlugins.actions-preview-nvim)]; extraConfigLua = '' - vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo") require("actions-preview").setup { highlight_command = { require("actions-preview.highlight").delta("${pkgs.delta}/bin/delta --no-gitconfig --side-by-side"), @@ -49,6 +58,14 @@ require("actions-preview").code_actions ''; } + { + key = ""; + action = "tabnext"; + } + { + key = ""; + action = "tabprev"; + } { key = "gl"; action = "g$"; @@ -57,30 +74,84 @@ key = "gh"; action = "g0"; } + { + mode = "v"; + key = ">"; + action = ">gv"; + options.desc = "indent"; + options.silent = true; + } + { + mode = "v"; + key = "<"; + action = "fg" = "live_grep"; "/" = "live_grep"; @@ -101,6 +177,9 @@ "fb" = "buffers"; "fh" = "help_tags"; ":" = "commands"; + "ft" = "treesitter"; + "fr" = "lsp_references"; + "cr" = "lsp_definition"; }; }; @@ -114,17 +193,6 @@ lspBuf = { "ck" = "hover"; "K" = "hover"; - - # using actions-preview instead - # "ca" = "code_action"; - # "" = "code_action"; - - "cd" = "definition"; - "gd" = "definition"; - - "cf" = "references"; - "gr" = "references"; - "cr" = "rename"; "" = "rename"; }; @@ -148,10 +216,6 @@ lazygit.enable = true; which-key.enable = true; - dap = { - enable = true; - extensions.dap-ui.enable = true; - }; harpoon = { enable = true; keymaps = { @@ -162,6 +226,27 @@ }; vim-css-color.enable = true; + + treesitter = { + enable = true; + folding = true; + }; + treesitter-textobjects = { + enable = true; + select = { + enable = true; + lookahead = true; + keymaps = { + "af" = { query = "@function.outer"; desc = "Function Outer"; }; + "ac" = { query = "@comment.outer"; desc = "Comment Outer"; }; + "if" = { query = "@function.inner"; desc = "Function Inner"; }; + }; + }; + }; + + oil.enable = true; + autoclose.enable = true; + guess-indent.enable = true; }; } From 29bd3b69f800668f741f5f3e9efa372069ef782a Mon Sep 17 00:00:00 2001 From: Tristan Date: Wed, 2 Oct 2024 00:37:09 +0100 Subject: [PATCH 37/65] nixbook: gruvbox theme and fix nixvim cmp --- home/programs/graphical.nix | 9 --------- lib/nixvim.nix | 27 +++++++++++++++++++++++---- nixos/workstation.nix | 16 +++++++++++++++- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 628070d..468dd24 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -44,15 +44,6 @@ gtk = { enable = true; - iconTheme = { - name = "Vimix-Doder"; - package = pkgs.vimix-icon-theme; - }; - cursorTheme = { - name = "Vanilla-DMZ"; - package = pkgs.vanilla-dmz; - size = 24; - }; gtk3.bookmarks = [ "file:///home/tristan/Documents" "file:///home/tristan/Pictures/Screenshots" diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 3091902..2d44525 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -59,11 +59,11 @@ ''; } { - key = ""; + key = ""; action = "tabnext"; } { - key = ""; + key = ""; action = "tabprev"; } { @@ -201,11 +201,29 @@ cmp = { enable = true; - autoEnableSources = true; + settings = { + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + }; }; - cmp-nvim-lsp.enable = true; + cmp-nvim-lsp-signature-help.enable = true; cmp-path.enable = true; + cmp-buffer.enable = true; + + trouble.enable = true; gitsigns.enable = true; git-worktree = { @@ -246,6 +264,7 @@ oil.enable = true; autoclose.enable = true; + ts-autotag.enable = true; guess-indent.enable = true; }; diff --git a/nixos/workstation.nix b/nixos/workstation.nix index 1ab3a81..ebb0c3a 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -52,13 +52,27 @@ stylix = { enable = true; image = ../images/nix-soft.png; - base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; opacity = { terminal = 0.9; applications = 0.9; desktop = 0.9; popups = 0.9; }; + cursor = { + name = "Vanilla-DMZ"; + package = pkgs.vanilla-dmz; + size = 24; + }; + targets = { + gtk.enable = false; # fails to switch with cosmic overriding it (grr) + grub = { + useImage = true; + }; + nixvim = { + transparentBackground.main = true; + }; + }; }; nixpkgs.overlays = [ From 8874e920d25bcc54c0ab78ad69944ff1986ebc02 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 24 Oct 2024 10:45:09 +0100 Subject: [PATCH 38/65] nixbook: element-desktop-wayland --- home/programs/graphical.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 468dd24..6d8b720 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -29,7 +29,7 @@ shortwave # other - element-desktop + element-desktop-wayland brave bitwarden ]; From ab83a2ed2597c95147deb778f3e54c59a49f9c24 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 6 Oct 2024 18:05:22 +0100 Subject: [PATCH 39/65] cosmic: update module --- flake.lock | 6 +- flake.nix | 4 +- home/desktop/cosmic/default.nix | 233 +++++++------------------------- 3 files changed, 52 insertions(+), 191 deletions(-) diff --git a/flake.lock b/flake.lock index f03dd3b..03dee71 100644 --- a/flake.lock +++ b/flake.lock @@ -304,11 +304,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1727725142, - "narHash": "sha256-VHM8iZb1y/y0gOGD6Q/4Yey0OHczLrBNp6BLBiDwWFU=", + "lastModified": 1728079598, + "narHash": "sha256-RUOZKSntxbTN7seIzq9oGNgh3LP00CDtspEDVyuD1hM=", "owner": "tristanbeedell", "repo": "home-manager", - "rev": "ed1eed53419d49d7de94e34678e3261dbdd07dfd", + "rev": "faf69fb8d9690429cc1d55ae39c5c40cdded71ff", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 060f1ce..b81f9ac 100644 --- a/flake.nix +++ b/flake.nix @@ -6,9 +6,7 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager-cosmic = { - url = "github:tristanbeedell/home-manager/cosmic"; - }; + home-manager-cosmic.url = "github:tristanbeedell/home-manager/cosmic"; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index d87403b..6116d5c 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -1,178 +1,41 @@ {pkgs, config, ...}: let - bind = mods: key: action: { - modifiers = ["Super"] ++ mods; - inherit key action; - }; - _action = type: value: { - inherit type value; - }; - Actions = (enum [ - # Close the active window - "Close" - - # Show a debug overlay if enabled in the compositor build - "Debug" - - # Disable a default shortcut binding - "Disable" - - # Change focus to the last workspace - "LastWorkspace" - - # Maximize the active window - "Maximize" - - # Migrate the active workspace to the next output - "MigrateWorkspaceToNextOutput" - - # Migrate the active workspace to the previous output - "MigrateWorkspaceToPreviousOutput" - - # Minimize the active window - "Minimize" - - # Move a window to the last workspace - "MoveToLastWorkspace" - - # Move a window to the next output - "MoveToNextOutput" - - # Move a window to the next workspace - "MoveToNextWorkspace" - - # Move a window to the previous output - "MoveToPreviousOutput" - - # Move a window to the previous workspace - "MoveToPreviousWorkspace" - - # Change focus to the next output - "NextOutput" - - # Change focus to the next workspace - "NextWorkspace" - - # Change focus to the previous output - "PreviousOutput" - - # Change focus to the previous workspace - "PreviousWorkspace" - - # Move a window to the last workspace - "SendToLastWorkspace" - - # Move a window to the next output - "SendToNextOutput" - - # Move a window to the next workspace - "SendToNextWorkspace" - - # Move a window to the previous output - "SendToPreviousOutput" - - # Move a window to the previous workspace - "SendToPreviousWorkspace" - - # Swap positions of the active window with another - "SwapWindow" - - # Stop the compositor - "Terminate" - - # Toggle the orientation of a tiling group - "ToggleOrientation" - - # Toggle window stacking for the active window - "ToggleStacking" - - # Toggle the sticky state of the active window - "ToggleSticky" - - # Toggle tiling mode of the active workspace - "ToggleTiling" - - # Toggle between tiling and floating window states for the active window - "ToggleWindowFloating" - - ]) // { - - # Change focus to the window or workspace in the given direction - "Focus" = FocusDirection: _action "Focus" FocusDirection; - # Migrate the active workspace to the output in the given direction - "MigrateWorkspaceToOutput" = Direction: _action "MigrateWorkspaceToOutput" Direction; - # Move a window in the given direction - Move = Direction: _action "Move" Direction; - # Move a window to the given output - MoveToOutput = Direction: _action "MoveToOutput" Direction; - # Move a window to the given workspace - MoveToWorkspace = u8: _action "MoveToWorkspace" u8; - # Change the orientation of a tiling group - Orientation = Orientation: _action "Orientation" Orientation; - # Resize the active window in a given direction - Resizing = ResizeDirection: _action "Resizing" ResizeDirection; - # Move a window to the output in the given direction - SendToOutput = Direction: _action "SendToOutput" Direction; - # Move a window to the given workspace - SendToWorkspace = u8: _action "SendToWorkspace" u8; - # Move to an output in the given direction - SwitchOutput = Direction: _action "SwitchOutput" Direction; - # Perform a common system operation - System = System: _action "System" System; - # Execute a command with any given arguments - Spawn = String: _action "Spawn" String; - # Change focus to the given workspace ID - Workspace = u8: _action "Workspace" u8; - - }; - - Modifiers = enum [ - "Super" - "Ctrl" - "Alt" - "Shift" - ]; - - enum = builtins.foldl' (acc: el: {${el}=el;} // acc) {}; - -in with Modifiers; { + inherit (config.lib.cosmic) Actions; +in { programs.cosmic = { enable = true; - defaultKeybindings = false; - keybindings = [ + input.defaultKeybindings = false; + input.binds = { # Navigation - (bind [Super] "h" (Actions.Focus "Left")) - (bind [Super] "l" (Actions.Focus "Right")) - (bind [Super] "j" (Actions.Focus "Down")) - (bind [Super] "k" (Actions.Focus "Up")) - (bind [Super Shift] "h" (Actions.Move "Left")) - (bind [Super Shift] "l" (Actions.Move "Right")) - (bind [Super Shift] "j" (Actions.Move "Down")) - (bind [Super Shift] "k" (Actions.Move "Up")) - - (bind [Super] "1" (Actions.Workspace 1)) - (bind [Super] "2" (Actions.Workspace 2)) - (bind [Super] "3" (Actions.Workspace 3)) - (bind [Super] "4" (Actions.Workspace 4)) - (bind [Super] "5" (Actions.Workspace 5)) - (bind [Super Shift] "1" (Actions.MoveToWorkspace 1)) - (bind [Super Shift] "2" (Actions.MoveToWorkspace 2)) - (bind [Super Shift] "3" (Actions.MoveToWorkspace 3)) - (bind [Super Shift] "4" (Actions.MoveToWorkspace 4)) - (bind [Super Shift] "5" (Actions.MoveToWorkspace 5)) - - (bind [Super] "Space" Actions.ToggleWindowFloating) - (bind [Super] "f" Actions.Maximize) - (bind [Super] "m" Actions.Minimize) - (bind [Super Shift] "x" Actions.Close) - - (bind [Super Shift] "v" Actions.ToggleStacking) - (bind [Super Shift] "y" Actions.ToggleSticky) + Super. "h" = (Actions.Focus "Left"); + Super. "l" = (Actions.Focus "Right"); + Super. "j" = (Actions.Focus "Down"); + Super. "k" = (Actions.Focus "Up"); + Super.Shift. "h" = (Actions.Move "Left"); + Super.Shift. "l" = (Actions.Move "Right"); + Super.Shift. "j" = (Actions.Move "Down"); + Super.Shift. "k" = (Actions.Move "Up"); + Super. "1" = (Actions.Workspace 1); + Super. "2" = (Actions.Workspace 2); + Super. "3" = (Actions.Workspace 3); + Super. "4" = (Actions.Workspace 4); + Super. "5" = (Actions.Workspace 5); + Super.Shift. "1" = (Actions.MoveToWorkspace 1); + Super.Shift. "2" = (Actions.MoveToWorkspace 2); + Super.Shift. "3" = (Actions.MoveToWorkspace 3); + Super.Shift. "4" = (Actions.MoveToWorkspace 4); + Super.Shift. "5" = (Actions.MoveToWorkspace 5); + Super. "Space" = Actions.ToggleWindowFloating; + Super. "f" = Actions.Maximize; + Super. "m" = Actions.Minimize; + Super.Shift. "x" = Actions.Close; + Super.Shift. "v" = Actions.ToggleStacking; + Super.Shift. "y" = Actions.ToggleSticky; # System - (bind [Super] "d" (Actions.Spawn config.programs.menu.drunCommand)) - (bind [Super] "Return" (Actions.Spawn "${pkgs.alacritty}/bin/alacritty")) - (bind [Super] "o" (Actions.System "HomeFolder")) - (bind [Super Shift] "s" (Actions.Spawn "cosmic-screenshot")) - ]; + Super. "d" = (Actions.Spawn config.programs.menu.drunCommand); + Super. "Return" = (Actions.Spawn pkgs.alacritty); + Super. "o" = (Actions.System "HomeFolder"); + Super.Shift. "s" = (Actions.Spawn "cosmic-screenshot"); + }; background = { displays = { all = { @@ -180,21 +43,21 @@ in with Modifiers; { }; }; }; - panels = { - Panel = { - applets = { - start = [ "com.system76.CosmicAppletWorkspaces" ]; - center = [ "com.system76.CosmicAppList" ]; - end = [ - "com.system76.CosmicAppletTime" - "com.system76.CosmicAppletAudio" - "com.system76.CosmicAppletNotifications" - "com.system76.CosmicAppletMinimize" - "com.system76.CosmicAppletPower" - ]; - }; - }; - }; + # panels = { + # Panel = { + # applets = { + # start = [ "com.system76.CosmicAppletWorkspaces" ]; + # center = [ "com.system76.CosmicAppList" ]; + # end = [ + # "com.system76.CosmicAppletTime" + # "com.system76.CosmicAppletAudio" + # "com.system76.CosmicAppletNotifications" + # "com.system76.CosmicAppletMinimize" + # "com.system76.CosmicAppletPower" + # ]; + # }; + # }; + # }; settings = { "com.system76.CosmicComp".options = { autotile = true; From ca39b169c2158a5cb07d4bb5634566e6b1e4a627 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 24 Oct 2024 10:45:12 +0100 Subject: [PATCH 40/65] nixbook: tidying, add gopls --- home/programs/neovim/default.nix | 5 +++-- home/workstation.nix | 3 +-- lib/nixvim.nix | 2 +- nixos/programs/pipewire.nix | 3 +-- nixos/workstation.nix | 13 ------------- 5 files changed, 6 insertions(+), 20 deletions(-) diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index 4e99ede..4685486 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{config, pkgs, lib, ...}: { programs.nixvim = { enable = true; @@ -8,7 +8,8 @@ programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; userSettings = { - "vscode-neovim.neovimExecutablePaths.linux" = "${pkgs.neovim}/bin/nvim"; + "vscode-neovim.neovimExecutablePaths.linux" = + lib.getExe config.programs.nixvim.package; "extensions.experimental.affinity" = { "asvetliakov.vscode-neovim" = 1; }; diff --git a/home/workstation.nix b/home/workstation.nix index 0a6c574..88ebdcf 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -36,8 +36,7 @@ programs.rbw.settings.pinentry = pkgs.pinentry-gnome3; - home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ"; - home.file.".config/pipewire/pipewire.conf.d/raop-discover.conf".text = '' + xdg.configFile."pipewire/pipewire.conf.d/raop-discover.conf".text = '' context.modules = [ { name = libpipewire-module-raop-discover diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 2d44525..b94c0e9 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -188,6 +188,7 @@ servers = { ts-ls.enable = true; nil-ls.enable = true; + gopls.enable = true; }; keymaps = { lspBuf = { @@ -263,7 +264,6 @@ }; oil.enable = true; - autoclose.enable = true; ts-autotag.enable = true; guess-indent.enable = true; }; diff --git a/nixos/programs/pipewire.nix b/nixos/programs/pipewire.nix index 2610134..57a8694 100644 --- a/nixos/programs/pipewire.nix +++ b/nixos/programs/pipewire.nix @@ -7,9 +7,8 @@ alsa.support32Bit = true; pulse.enable = true; jack.enable = true; + raopOpenFirewall = true; }; - # pipewire raop - networking.firewall.allowedUDPPorts = [6002 6001]; # network streaming networking.firewall.allowedTCPPorts = [4713]; } diff --git a/nixos/workstation.nix b/nixos/workstation.nix index ebb0c3a..b997b05 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -10,19 +10,6 @@ ]; security.polkit.enable = true; - systemd.user.services.polkit-gnome-authentication-agent-1 = { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = ["graphical-session.target"]; - wants = ["graphical-session.target"]; - after = ["graphical-session.target"]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; hardware.opentabletdriver.enable = true; From 9c6e2ac6bf1abaf872ddf8e3dceb41f3dbabeb08 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 6 Oct 2024 22:36:53 +0100 Subject: [PATCH 41/65] zenix: fixes to cosmic exp hm module and git bclone opt passthru --- flake.lock | 16 +++++--------- flake.nix | 2 +- home/desktop/cosmic/default.nix | 39 +++++++++++++++++++-------------- home/programs/git.nix | 13 ++++++++--- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index 03dee71..4f172a0 100644 --- a/flake.lock +++ b/flake.lock @@ -304,18 +304,14 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1728079598, - "narHash": "sha256-RUOZKSntxbTN7seIzq9oGNgh3LP00CDtspEDVyuD1hM=", - "owner": "tristanbeedell", - "repo": "home-manager", - "rev": "faf69fb8d9690429cc1d55ae39c5c40cdded71ff", - "type": "github" + "lastModified": 1728249206, + "narHash": "sha256-p/ntQwqm0zA/HnitCL8UrzMuC8mjUDr7LEu/f3XiWsU=", + "path": "/home/tristan/Documents/code/home-manager/cosmic", + "type": "path" }, "original": { - "owner": "tristanbeedell", - "ref": "cosmic", - "repo": "home-manager", - "type": "github" + "path": "/home/tristan/Documents/code/home-manager/cosmic", + "type": "path" } }, "home-manager_2": { diff --git a/flake.nix b/flake.nix index b81f9ac..15e81b5 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager-cosmic.url = "github:tristanbeedell/home-manager/cosmic"; + home-manager-cosmic.url = "path:///home/tristan/Documents/code/home-manager/cosmic"; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index 6116d5c..f8c0282 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -3,7 +3,7 @@ in { programs.cosmic = { enable = true; - input.defaultKeybindings = false; + input.asDefaults = true; input.binds = { # Navigation Super. "h" = (Actions.Focus "Left"); @@ -34,7 +34,7 @@ in { Super. "d" = (Actions.Spawn config.programs.menu.drunCommand); Super. "Return" = (Actions.Spawn pkgs.alacritty); Super. "o" = (Actions.System "HomeFolder"); - Super.Shift. "s" = (Actions.Spawn "cosmic-screenshot"); + Super.Shift. "s" = (Actions.System "Screenshot"); }; background = { displays = { @@ -43,21 +43,26 @@ in { }; }; }; - # panels = { - # Panel = { - # applets = { - # start = [ "com.system76.CosmicAppletWorkspaces" ]; - # center = [ "com.system76.CosmicAppList" ]; - # end = [ - # "com.system76.CosmicAppletTime" - # "com.system76.CosmicAppletAudio" - # "com.system76.CosmicAppletNotifications" - # "com.system76.CosmicAppletMinimize" - # "com.system76.CosmicAppletPower" - # ]; - # }; - # }; - # }; + panels = { + "Bar" = { + applets = { + start = [ "com.system76.CosmicAppletWorkspaces" ]; + center = [ "com.system76.CosmicAppList" ]; + end = [ + "com.system76.CosmicAppletTime" + "com.system76.CosmicAppletTiling" + "com.system76.CosmicAppletAudio" + "com.system76.CosmicAppletNotifications" + "com.system76.CosmicAppletMinimize" + "com.system76.CosmicAppletPower" + ]; + }; + options = { + size = "XS"; + border_radius = 0; + }; + }; + }; settings = { "com.system76.CosmicComp".options = { autotile = true; diff --git a/home/programs/git.nix b/home/programs/git.nix index cc5b7b7..e7cd7aa 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -9,11 +9,18 @@ bclone = "!sh ${pkgs.writeShellScriptBin "bare-clone" '' url=$1 basename=''${url##*/} - name=''${2:-''${basename%.*}} + if [[ $2 == -* ]] + then + opts=''${@:2} + name=''${basename%.*} + else + opts=''${@:3} + name=''${2:-''${basename%.*}} + fi mkdir "$name" - git clone --bare "$url" "$name/.bare" || { + git clone --bare "$url" "$name/.bare" $opts || { rm -r "$name" exit 1 } @@ -23,7 +30,7 @@ git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch origin + git fetch origin $opts ''}/bin/bare-clone"; }; delta = { From c85858eab7f7facf9328d736594cc8fa2cab964e Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 6 Oct 2024 23:08:44 +0100 Subject: [PATCH 42/65] zenix: fmt, obs wlrobs --- flake.lock | 16 +++++---- flake.nix | 2 +- hardware/zenix.nix | 2 +- home/desktop/cosmic/default.nix | 60 ++++++++++++++++++--------------- home/programs/graphical.nix | 6 +++- nixos/programs/cosmic.nix | 6 +++- 6 files changed, 55 insertions(+), 37 deletions(-) diff --git a/flake.lock b/flake.lock index 4f172a0..32ecd43 100644 --- a/flake.lock +++ b/flake.lock @@ -304,14 +304,18 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1728249206, - "narHash": "sha256-p/ntQwqm0zA/HnitCL8UrzMuC8mjUDr7LEu/f3XiWsU=", - "path": "/home/tristan/Documents/code/home-manager/cosmic", - "type": "path" + "lastModified": 1728250817, + "narHash": "sha256-OVHpUlNxHpQUe2Waav/MR+Z7fm6ft/w8SxWlvXv+AdU=", + "owner": "tristanbeedell", + "repo": "home-manager", + "rev": "ce770a3e442b2105852a6f5f79f3645b4c64505c", + "type": "github" }, "original": { - "path": "/home/tristan/Documents/code/home-manager/cosmic", - "type": "path" + "owner": "tristanbeedell", + "ref": "cosmic", + "repo": "home-manager", + "type": "github" } }, "home-manager_2": { diff --git a/flake.nix b/flake.nix index 15e81b5..b81f9ac 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager-cosmic.url = "path:///home/tristan/Documents/code/home-manager/cosmic"; + home-manager-cosmic.url = "github:tristanbeedell/home-manager/cosmic"; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 8e7dde2..3a3cd19 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -29,7 +29,7 @@ in { device = "/dev/disk/by-label/nix"; fsType = "f2fs"; neededForBoot = true; - options = [ "noatime" ]; + options = ["noatime"]; }; boot.initrd.postDeviceCommands = pkgs.lib.mkBefore (decrypt { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index f8c0282..6a12893 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -1,40 +1,44 @@ -{pkgs, config, ...}: let +{ + pkgs, + config, + ... +}: let inherit (config.lib.cosmic) Actions; in { programs.cosmic = { enable = true; input.asDefaults = true; input.binds = { -# Navigation - Super. "h" = (Actions.Focus "Left"); - Super. "l" = (Actions.Focus "Right"); - Super. "j" = (Actions.Focus "Down"); - Super. "k" = (Actions.Focus "Up"); - Super.Shift. "h" = (Actions.Move "Left"); - Super.Shift. "l" = (Actions.Move "Right"); - Super.Shift. "j" = (Actions.Move "Down"); - Super.Shift. "k" = (Actions.Move "Up"); - Super. "1" = (Actions.Workspace 1); - Super. "2" = (Actions.Workspace 2); - Super. "3" = (Actions.Workspace 3); - Super. "4" = (Actions.Workspace 4); - Super. "5" = (Actions.Workspace 5); - Super.Shift. "1" = (Actions.MoveToWorkspace 1); - Super.Shift. "2" = (Actions.MoveToWorkspace 2); - Super.Shift. "3" = (Actions.MoveToWorkspace 3); - Super.Shift. "4" = (Actions.MoveToWorkspace 4); - Super.Shift. "5" = (Actions.MoveToWorkspace 5); + # Navigation + Super. "h" = Actions.Focus "Left"; + Super. "l" = Actions.Focus "Right"; + Super. "j" = Actions.Focus "Down"; + Super. "k" = Actions.Focus "Up"; + Super.Shift. "h" = Actions.Move "Left"; + Super.Shift. "l" = Actions.Move "Right"; + Super.Shift. "j" = Actions.Move "Down"; + Super.Shift. "k" = Actions.Move "Up"; + Super. "1" = Actions.Workspace 1; + Super. "2" = Actions.Workspace 2; + Super. "3" = Actions.Workspace 3; + Super. "4" = Actions.Workspace 4; + Super. "5" = Actions.Workspace 5; + Super.Shift. "1" = Actions.MoveToWorkspace 1; + Super.Shift. "2" = Actions.MoveToWorkspace 2; + Super.Shift. "3" = Actions.MoveToWorkspace 3; + Super.Shift. "4" = Actions.MoveToWorkspace 4; + Super.Shift. "5" = Actions.MoveToWorkspace 5; Super. "Space" = Actions.ToggleWindowFloating; Super. "f" = Actions.Maximize; Super. "m" = Actions.Minimize; Super.Shift. "x" = Actions.Close; Super.Shift. "v" = Actions.ToggleStacking; Super.Shift. "y" = Actions.ToggleSticky; -# System - Super. "d" = (Actions.Spawn config.programs.menu.drunCommand); - Super. "Return" = (Actions.Spawn pkgs.alacritty); - Super. "o" = (Actions.System "HomeFolder"); - Super.Shift. "s" = (Actions.System "Screenshot"); + # System + Super. "d" = Actions.Spawn config.programs.menu.drunCommand; + Super. "Return" = Actions.Spawn pkgs.alacritty; + Super. "o" = Actions.System "HomeFolder"; + Super.Shift. "s" = Actions.System "Screenshot"; }; background = { displays = { @@ -46,8 +50,10 @@ in { panels = { "Bar" = { applets = { - start = [ "com.system76.CosmicAppletWorkspaces" ]; - center = [ "com.system76.CosmicAppList" ]; + start = [ + "com.system76.CosmicAppletWorkspaces" + ]; + center = []; end = [ "com.system76.CosmicAppletTime" "com.system76.CosmicAppletTiling" diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index c6ef988..6c5050f 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -13,7 +13,6 @@ helvum # tools - obs-studio inkscape libsForQt5.okular gimp @@ -31,6 +30,11 @@ bitwarden ]; + programs.obs-studio = { + enable = true; + plugins = [pkgs.obs-studio-plugins.wlrobs]; + }; + xdg.mimeApps.defaultApplications = { "application/pdf" = "sioyek.desktop"; }; diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix index b5cbed6..8028081 100644 --- a/nixos/programs/cosmic.nix +++ b/nixos/programs/cosmic.nix @@ -1,4 +1,8 @@ -{inputs, config, ...}: { +{ + inputs, + config, + ... +}: { imports = [ inputs.nixos-cosmic.nixosModules.default ]; From 825381f98bee58ee6d759f9561f48a545631bf9e Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 24 Oct 2024 10:45:14 +0100 Subject: [PATCH 43/65] format --- hardware/fcs-tristan-nixbook.nix | 3 +-- home/programs/graphical.nix | 6 +----- home/programs/neovim/default.nix | 9 +++++++-- home/programs/work.nix | 1 - lib/nixvim.nix | 24 ++++++++++++++++-------- nixos/modules/work.nix | 1 - pkgs/mongodb.nix | 10 ++++++---- 7 files changed, 31 insertions(+), 23 deletions(-) diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index 17d970e..a3370d4 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -60,7 +60,7 @@ in { boot.plymouth.enable = true; boot.initrd.verbose = false; boot.consoleLogLevel = 1; - boot.kernelParams = [ "quiet" "udev.log_level=3" ]; + boot.kernelParams = ["quiet" "udev.log_level=3"]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -110,5 +110,4 @@ in { }; } ]; - } diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 6d8b720..a398bec 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { imports = [ ./pcmanfm.nix ./mpv.nix @@ -34,7 +31,6 @@ bitwarden ]; - xdg.mimeApps.defaultApplications = { "application/pdf" = "sioyek.desktop"; }; diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index 4685486..5508be3 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -1,9 +1,14 @@ -{config, pkgs, lib, ...}: { +{ + config, + pkgs, + lib, + ... +}: { programs.nixvim = { enable = true; } - // ( import ../../../lib/nixvim.nix {inherit pkgs;} ); + // (import ../../../lib/nixvim.nix {inherit pkgs;}); programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; diff --git a/home/programs/work.nix b/home/programs/work.nix index 4b26bc1..803b582 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -41,7 +41,6 @@ in { remoteWorkspaceFolder=$(echo $res | ${jq} -r '.remoteWorkspaceFolder') docker exec -it --workdir=$remoteWorkspaceFolder $containerId bash '')) - ]; home.sessionVariables = { diff --git a/lib/nixvim.nix b/lib/nixvim.nix index b94c0e9..221fc0c 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -202,7 +202,7 @@ cmp = { enable = true; - settings = { + settings = { mapping = { "" = "cmp.mapping.complete()"; "" = "cmp.mapping.scroll_docs(4)"; @@ -213,9 +213,9 @@ "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; }; sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} ]; }; }; @@ -256,9 +256,18 @@ enable = true; lookahead = true; keymaps = { - "af" = { query = "@function.outer"; desc = "Function Outer"; }; - "ac" = { query = "@comment.outer"; desc = "Comment Outer"; }; - "if" = { query = "@function.inner"; desc = "Function Inner"; }; + "af" = { + query = "@function.outer"; + desc = "Function Outer"; + }; + "ac" = { + query = "@comment.outer"; + desc = "Comment Outer"; + }; + "if" = { + query = "@function.inner"; + desc = "Function Inner"; + }; }; }; }; @@ -267,5 +276,4 @@ ts-autotag.enable = true; guess-indent.enable = true; }; - } diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index bd1427f..675ac39 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -17,7 +17,6 @@ in { "openssl-1.1.1w" # required for mongodb ]; - networking = { networkmanager = { plugins = [pkgs.networkmanager-openvpn]; diff --git a/pkgs/mongodb.nix b/pkgs/mongodb.nix index 6900602..46f2cac 100644 --- a/pkgs/mongodb.nix +++ b/pkgs/mongodb.nix @@ -1,6 +1,9 @@ -{stdenv, pkgs, ...}: -let - version = "6.0.14"; +{ + stdenv, + pkgs, + ... +}: let + version = "6.0.14"; in stdenv.mkDerivation { name = "mongodb"; @@ -29,4 +32,3 @@ in runHook postInstall ''; } - From a7d89b437ad3179b4039df355d832892608b1549 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 13 Oct 2024 07:15:28 +0100 Subject: [PATCH 44/65] zenix: cosmic applets and tailscale dns --- hardware/zenix.nix | 2 +- home/desktop/cosmic/default.nix | 7 +++++-- home/programs/graphical.nix | 7 +++++-- home/workstation.nix | 25 +++++++++++++++++++++++++ nixos/default.nix | 11 ++++------- nixos/programs/pipewire.nix | 2 +- nixos/workstation.nix | 5 ----- 7 files changed, 41 insertions(+), 18 deletions(-) diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 3a3cd19..22ea30e 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -64,7 +64,7 @@ in { networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; - networking.networkmanager.insertNameservers = ["1.1.1.1" "1.0.0.1"]; + networking.networkmanager.appendNameservers = ["1.1.1.1" "1.0.0.1"]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index 6a12893..c8281d5 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -53,13 +53,16 @@ in { start = [ "com.system76.CosmicAppletWorkspaces" ]; - center = []; + center = [ + "com.system76.CosmicAppletMinimize" + ]; end = [ "com.system76.CosmicAppletTime" "com.system76.CosmicAppletTiling" "com.system76.CosmicAppletAudio" + "com.system76.CosmicAppletNetwork" "com.system76.CosmicAppletNotifications" - "com.system76.CosmicAppletMinimize" + "com.system76.CosmicAppletStatusArea" "com.system76.CosmicAppletPower" ]; }; diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 6c5050f..9dc9f03 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -9,7 +9,7 @@ # system selectdefaultapplication easyeffects - pavucontrol + pwvucontrol helvum # tools @@ -32,7 +32,10 @@ programs.obs-studio = { enable = true; - plugins = [pkgs.obs-studio-plugins.wlrobs]; + plugins = [ + pkgs.obs-studio-plugins.wlrobs + pkgs.obs-studio-plugins.obs-pipewire-audio-capture + ]; }; xdg.mimeApps.defaultApplications = { diff --git a/home/workstation.nix b/home/workstation.nix index 88ebdcf..41b0d7c 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -36,6 +36,7 @@ programs.rbw.settings.pinentry = pkgs.pinentry-gnome3; + # https://docs.pipewire.org/page_module_raop_discover.html xdg.configFile."pipewire/pipewire.conf.d/raop-discover.conf".text = '' context.modules = [ { @@ -44,6 +45,30 @@ } ] ''; + xdg.configFile."pipewire/pipewire.conf.d/raop-sink.conf".text = '' + context.modules = [ + { name = libpipewire-module-raop-sink + args = { + # Set the remote address to tunnel to + raop.ip = "127.0.0.1" + raop.port = 8190 + raop.name = "my-raop-device" + raop.hostname = "My Service" + #raop.transport = "udp" + raop.encryption.type = "RSA" + #raop.audio.codec = "PCM" + #raop.password = "****" + #audio.format = "S16" + #audio.rate = 44100 + #audio.channels = 2 + #audio.position = [ FL FR ] + stream.props = { + # extra sink properties + } + } + } + ] + ''; services.gnome-keyring.enable = true; } diff --git a/nixos/default.nix b/nixos/default.nix index 68a84c1..8cc8a39 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -45,12 +45,6 @@ in { } ]; }; - networking.hosts = { - "100.65.29.110" = ["zenix"]; - "100.106.241.122" = ["alpine" "tristans.cloud"]; - "100.71.130.111" = ["fcs-tristan-nixbook"]; - "100.69.60.83" = ["google-pixel-8"]; - }; time.timeZone = lib.mkDefault "Europe/London"; @@ -59,7 +53,10 @@ in { useXkbConfig = true; }; - services.avahi.enable = true; + services.avahi = { + enable = true; + nssmdns4 = true; + }; i18n.defaultLocale = lib.mkDefault "en_GB.UTF-8"; diff --git a/nixos/programs/pipewire.nix b/nixos/programs/pipewire.nix index 57a8694..4650c3c 100644 --- a/nixos/programs/pipewire.nix +++ b/nixos/programs/pipewire.nix @@ -1,4 +1,4 @@ -{ +{pkgs, ...}: { hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { diff --git a/nixos/workstation.nix b/nixos/workstation.nix index b997b05..d358c77 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -13,15 +13,10 @@ hardware.opentabletdriver.enable = true; - programs.nm-applet.enable = true; - - services.printing.enable = true; - services.dbus = { enable = true; packages = [pkgs.gcr]; }; - programs.light.enable = true; programs.dconf.enable = true; hardware.bluetooth.enable = true; From a8c80aa3d58a655b3e57233cece20789406b193a Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 24 Oct 2024 10:45:15 +0100 Subject: [PATCH 45/65] nixbook: add postman, gofmt, difftastic --- flake.nix | 3 +-- home/programs/git.nix | 2 +- home/programs/work.nix | 1 + home/workstation.nix | 1 + lib/mkconf.nix | 1 + lib/nixvim.nix | 36 ++++++++++++++++++++++++++++++++++++ nixos/default.nix | 1 + nixos/modules/work.nix | 1 + nixos/programs/libvertd.nix | 14 ++++++++++++++ 9 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 nixos/programs/libvertd.nix diff --git a/flake.nix b/flake.nix index 8fae4e1..e6b7f52 100644 --- a/flake.nix +++ b/flake.nix @@ -50,11 +50,10 @@ FCS-Tristan-Nixbook = mkConf { nixos-modules = [ ./hardware/fcs-tristan-nixbook.nix - # (auto-login "Hyprland") - # ./nixos/programs/hyprland.nix ./nixos/workstation.nix ./nixos/modules/work.nix ./nixos/programs/cosmic.nix + ./nixos/programs/libvertd.nix ]; home-modules = [ ./home/programs/work.nix diff --git a/home/programs/git.nix b/home/programs/git.nix index cc5b7b7..0829c05 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -26,7 +26,7 @@ git fetch origin ''}/bin/bare-clone"; }; - delta = { + difftastic = { enable = true; }; }; diff --git a/home/programs/work.nix b/home/programs/work.nix index 803b582..09aeeb8 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -19,6 +19,7 @@ in { home.packages = [ pkgs.thunderbird pkgs.remmina + pkgs.postman (import ../../lib/mkapp.nix "slack" { inherit pkgs browser; desktopName = "Slack"; diff --git a/home/workstation.nix b/home/workstation.nix index 88ebdcf..7241379 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -27,6 +27,7 @@ wl-clipboard playerctl quickemu + devenv ]; services.udiskie = { diff --git a/lib/mkconf.nix b/lib/mkconf.nix index f779cdb..e8b9d34 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -24,6 +24,7 @@ in home-manager = { useGlobalPkgs = true; useUserPackages = true; + backupFileExtension = "bak"; users.${user}.imports = home-modules ++ [ diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 221fc0c..e763d61 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -66,6 +66,14 @@ key = ""; action = "tabprev"; } + { + key = "bn"; + action = "bnext"; + } + { + key = "bp"; + action = "bprevious"; + } { key = "gl"; action = "g$"; @@ -155,6 +163,33 @@ } ]; + autoCmd = [{ + event = "BufWritePre"; + pattern = "*.go"; + # https://github.com/golang/tools/blob/master/gopls/doc/vim.md#imports-and-formatting + callback.__raw = '' + function() + local params = vim.lsp.util.make_range_params() + params.context = {only = {"source.organizeImports"}} + -- buf_request_sync defaults to a 1000ms timeout. Depending on your + -- machine and codebase, you may want longer. Add an additional + -- argument after params if you find that you have to write the file + -- twice for changes to be saved. + -- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000) + local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params) + for cid, res in pairs(result or {}) do + for _, r in pairs(res.result or {}) do + if r.edit then + local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16" + vim.lsp.util.apply_workspace_edit(r.edit, enc) + end + end + end + vim.lsp.buf.format({async = false}) + end + ''; + }]; + plugins = { bufferline.enable = true; web-devicons.enable = true; @@ -188,6 +223,7 @@ servers = { ts-ls.enable = true; nil-ls.enable = true; + yamlls.enable = true; gopls.enable = true; }; keymaps = { diff --git a/nixos/default.nix b/nixos/default.nix index 68a84c1..793d0d7 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -96,6 +96,7 @@ in { unzip fzf sops + lsof ]; boot.kernel.sysctl = { diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index 675ac39..24d9b2d 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -11,6 +11,7 @@ in { # nonfree vscode required for dev containers "vscode" "steam-run" + "postman" ]; nixpkgs.config.permittedInsecurePackages = [ diff --git a/nixos/programs/libvertd.nix b/nixos/programs/libvertd.nix new file mode 100644 index 0000000..b7500d9 --- /dev/null +++ b/nixos/programs/libvertd.nix @@ -0,0 +1,14 @@ +{config, ...}: let + user = config.user; +in +{ + users.users.${user}.extraGroups = ["libvirtd" "kvm"]; + virtualisation.libvirtd = { + enable = true; + nss = { + enable = true; + enableGuest = true; + }; + }; + programs.virt-manager.enable = true; +} From 56dc76e1cf79a7492c09496bf481df9354f17dee Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 19 Oct 2024 00:03:10 +0100 Subject: [PATCH 46/65] nixbook: go dap, tidying --- home/desktop/cosmic/default.nix | 3 +- lib/nixvim.nix | 60 ++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index c8281d5..baaaa80 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -1,6 +1,7 @@ { pkgs, config, + lib, ... }: let inherit (config.lib.cosmic) Actions; @@ -43,7 +44,7 @@ in { background = { displays = { all = { - source = ../../../images/nier2.jpg; + source = lib.mkDefault config.stylix.image; }; }; }; diff --git a/lib/nixvim.nix b/lib/nixvim.nix index e763d61..51f80c6 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -1,4 +1,10 @@ -{pkgs, ...}: { +{pkgs, ...}: let + lua = cmd: {__raw = cmd;}; + luaFunc = cmd: lua '' + function () + ${cmd} + end''; +in { globals = { mapleader = " "; }; @@ -12,7 +18,7 @@ scrolloff = 4; undofile = true; - undodir.__raw = ''vim.fn.expand("$HOME/.local/share/nvim/undo")''; + undodir = lua ''vim.fn.expand("$HOME/.local/share/nvim/undo")''; list = true; listchars = builtins.concatStringsSep "," [ @@ -161,14 +167,48 @@ action = ""; options.desc = "Harpoon"; } + { + key = ""; + action = luaFunc "require('dap').continue()"; + options.desc = "DAP continue"; + } + { + key = "dc"; + action = luaFunc "require('dap').continue()"; + options.desc = "DAP continue"; + } + { + key = "db"; + action = luaFunc "require('dap').toggle_breakpoint()"; + options.desc = "DAP toggle breakpoint"; + } + { + key = "dn"; + action = luaFunc "require('dap').step_over()"; + options.desc = "DAP step over"; + } + { + key = "di"; + action = luaFunc "require('dap').step_into()"; + options.desc = "DAP step into"; + } + { + key = "do"; + action = luaFunc "require('dap').step_out()"; + options.desc = "DAP step out"; + } + { + key = "du"; + action = luaFunc "require('dapui').toggle()"; + options.desc = "DAP UI Toggle"; + } ]; autoCmd = [{ event = "BufWritePre"; pattern = "*.go"; # https://github.com/golang/tools/blob/master/gopls/doc/vim.md#imports-and-formatting - callback.__raw = '' - function() + callback = luaFunc '' local params = vim.lsp.util.make_range_params() params.context = {only = {"source.organizeImports"}} -- buf_request_sync defaults to a 1000ms timeout. Depending on your @@ -186,7 +226,6 @@ end end vim.lsp.buf.format({async = false}) - end ''; }]; @@ -236,6 +275,17 @@ }; }; + dap = { + enable = true; + extensions.dap-go = { + enable = true; + # tests.verbose = true; # ??? + }; + extensions.dap-ui = { + enable = true; + }; + }; + cmp = { enable = true; settings = { From 83c08c6d75cc58c9bfc39066f1c83a3226ee7a81 Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 19 Oct 2024 14:58:39 +0100 Subject: [PATCH 47/65] cosmic: update hm module --- flake.lock | 8 ++++---- flake.nix | 2 +- home/desktop/cosmic/default.nix | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 32ecd43..de2a262 100644 --- a/flake.lock +++ b/flake.lock @@ -304,17 +304,17 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1728250817, - "narHash": "sha256-OVHpUlNxHpQUe2Waav/MR+Z7fm6ft/w8SxWlvXv+AdU=", + "lastModified": 1729339643, + "narHash": "sha256-NNJ9s0axzL2XRsqTF8Zx/OzjW7LngWwMbSeHOCXukbk=", "owner": "tristanbeedell", "repo": "home-manager", - "rev": "ce770a3e442b2105852a6f5f79f3645b4c64505c", + "rev": "4e0f341e97b8a70be8a396d3778efbd8209e302e", "type": "github" }, "original": { "owner": "tristanbeedell", - "ref": "cosmic", "repo": "home-manager", + "rev": "4e0f341e97b8a70be8a396d3778efbd8209e302e", "type": "github" } }, diff --git a/flake.nix b/flake.nix index c655bec..e393d31 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager-cosmic.url = "github:tristanbeedell/home-manager/cosmic"; + home-manager-cosmic.url = "github:tristanbeedell/home-manager/4e0f341e97b8a70be8a396d3778efbd8209e302e"; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index baaaa80..93060ee 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -4,12 +4,12 @@ lib, ... }: let - inherit (config.lib.cosmic) Actions; + inherit (config.lib.cosmic) Actions mapBinds; in { programs.cosmic = { enable = true; input.asDefaults = true; - input.binds = { + input.binds = mapBinds { # Navigation Super. "h" = Actions.Focus "Left"; Super. "l" = Actions.Focus "Right"; From 7322eaeb6f50264258a118ea38bcc9f0d10c97d5 Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 23 Oct 2024 00:02:18 +0100 Subject: [PATCH 48/65] nixbook: update hm-cosmic module --- flake.lock | 89 ++++++++++++++++++++++++++------- flake.nix | 2 +- home/desktop/cosmic/default.nix | 17 ++++--- nixos/programs/cosmic.nix | 2 +- 4 files changed, 84 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index de2a262..e1826e6 100644 --- a/flake.lock +++ b/flake.lock @@ -301,24 +301,63 @@ }, "home-manager-cosmic": { "inputs": { - "nixpkgs": "nixpkgs" + "home-manager": "home-manager_2", + "home-manager-cosmic": "home-manager-cosmic_2" }, "locked": { - "lastModified": 1729339643, - "narHash": "sha256-NNJ9s0axzL2XRsqTF8Zx/OzjW7LngWwMbSeHOCXukbk=", + "lastModified": 1729637091, + "narHash": "sha256-nrzQMU4Y+ASKzCzugapaexKxhNXvFLrFmqPcLR0H7Yk=", "owner": "tristanbeedell", - "repo": "home-manager", - "rev": "4e0f341e97b8a70be8a396d3778efbd8209e302e", + "repo": "hm-cosmic", + "rev": "0a12abbd1b52142d187cddb9050a0a7a14297b09", "type": "github" }, "original": { + "owner": "tristanbeedell", + "ref": "master", + "repo": "hm-cosmic", + "type": "github" + } + }, + "home-manager-cosmic_2": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1729633506, + "narHash": "sha256-DWJBRqIgR+oziSk38bZTFoMEvrSKREOc61BRyOHgmh8=", "owner": "tristanbeedell", "repo": "home-manager", - "rev": "4e0f341e97b8a70be8a396d3778efbd8209e302e", + "rev": "b826bf8c1d5e3e9600d6dc92563c661f97f60f71", + "type": "github" + }, + "original": { + "owner": "tristanbeedell", + "ref": "cosmic", + "repo": "home-manager", "type": "github" } }, "home-manager_2": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1729551526, + "narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "5ec753a1fc4454df9285d8b3ec0809234defb975", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { "inputs": { "nixpkgs": [ "nixvim", @@ -339,7 +378,7 @@ "type": "github" } }, - "home-manager_3": { + "home-manager_4": { "inputs": { "nixpkgs": [ "stylix", @@ -406,11 +445,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722185531, - "narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=", + "lastModified": 1729256560, + "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "type": "github" }, "original": { @@ -453,6 +492,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1729256560, + "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1727122398, "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", @@ -467,7 +522,7 @@ "type": "indirect" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1725534445, "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=", @@ -483,7 +538,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -505,7 +560,7 @@ "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "git-hooks": "git-hooks", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", "nixpkgs": [ "nixpkgs" @@ -554,7 +609,7 @@ "home-manager": "home-manager", "home-manager-cosmic": "home-manager-cosmic", "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixvim": "nixvim", "sops-nix": "sops-nix", "stylix": "stylix" @@ -583,7 +638,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -609,8 +664,8 @@ "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_4", + "home-manager": "home-manager_4", + "nixpkgs": "nixpkgs_5", "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", diff --git a/flake.nix b/flake.nix index e393d31..29e8252 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager-cosmic.url = "github:tristanbeedell/home-manager/4e0f341e97b8a70be8a396d3778efbd8209e302e"; + home-manager-cosmic.url = "github:tristanbeedell/hm-cosmic/master"; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index 93060ee..b287c5e 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -15,6 +15,8 @@ in { Super. "l" = Actions.Focus "Right"; Super. "j" = Actions.Focus "Down"; Super. "k" = Actions.Focus "Up"; + Super. "u" = Actions.Focus "Out"; + Super. "i" = Actions.Focus "In"; Super.Shift. "h" = Actions.Move "Left"; Super.Shift. "l" = Actions.Move "Right"; Super.Shift. "j" = Actions.Move "Down"; @@ -73,13 +75,14 @@ in { }; }; }; - settings = { - "com.system76.CosmicComp".options = { - autotile = true; - active_hint = true; - focus_follows_cursor = true; - focus_follows_cursor_delay = 0; - cursor_follows_focus = true; + comp.settings = { + autotile = true; + active_hint = true; + focus_follows_cursor = true; + focus_follows_cursor_delay = 0; + cursor_follows_focus = true; + workspaces = { + workspace_layout = "Horizontal"; }; }; }; diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix index 8028081..140334e 100644 --- a/nixos/programs/cosmic.nix +++ b/nixos/programs/cosmic.nix @@ -14,7 +14,7 @@ services.displayManager.cosmic-greeter.enable = true; services.system76-scheduler.enable = true; home-manager.users.${config.user}.imports = [ - (import "${inputs.home-manager-cosmic}/modules/programs/cosmic/.") + (inputs.home-manager-cosmic.homeManagerModules.cosmic) ../../home/desktop/cosmic/. ]; } From 3bae7dc77c81f1f3e19618e626669d4e1a20180e Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 23 Oct 2024 22:53:02 +0100 Subject: [PATCH 49/65] nixbook: git config, nixd, format --- home/programs/git.nix | 1 + home/programs/neovim/default.nix | 4 +- home/programs/work.nix | 29 ++++++++----- home/workstation.nix | 47 ++++++++++---------- lib/nixvim.nix | 73 ++++++++++++++++++++------------ nixos/programs/libvertd.nix | 3 +- 6 files changed, 91 insertions(+), 66 deletions(-) diff --git a/home/programs/git.nix b/home/programs/git.nix index 73deb04..20c04ac 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -5,6 +5,7 @@ graph = "log --oneline --all --graph"; amend = "commit --amend --no-edit"; sdiff = "diff --staged"; + fpush = "push --force-with-lease"; t = "tag --annotate"; bclone = "!sh ${pkgs.writeShellScriptBin "bare-clone" '' url=$1 diff --git a/home/programs/neovim/default.nix b/home/programs/neovim/default.nix index 5508be3..31d7b51 100644 --- a/home/programs/neovim/default.nix +++ b/home/programs/neovim/default.nix @@ -3,12 +3,12 @@ pkgs, lib, ... -}: { +} @ input: { programs.nixvim = { enable = true; } - // (import ../../../lib/nixvim.nix {inherit pkgs;}); + // (import ../../../lib/nixvim.nix input); programs.vscode = { extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim]; diff --git a/home/programs/work.nix b/home/programs/work.nix index 09aeeb8..51140b3 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -15,6 +15,11 @@ in { email = "tristan.beedell@cryoserver.com"; terminal = false; }; + programs.git.extraConfig = { + "includeIf \"gitdir:~/Documents/personal/\"" = { + path = "~/Documents/personal/.gitconfig"; + }; + }; home.packages = [ pkgs.thunderbird @@ -31,17 +36,19 @@ in { desktopName = "Microsoft Teams"; }) pkgs.devcontainer - (pkgs.writeShellScriptBin "devcontainer-open" (let - jq = "${pkgs.jq}/bin/jq"; - devcontainer = "${pkgs.devcontainer}/bin/devcontainer"; - in '' - res=$(${devcontainer} up --workspace-folder .) - outcome=$(echo $res | ${jq} -r '.outcome') - [[ $outcome = "success" ]] || exit 1 - containerId=$(echo $res | ${jq} -r '.containerId') - remoteWorkspaceFolder=$(echo $res | ${jq} -r '.remoteWorkspaceFolder') - docker exec -it --workdir=$remoteWorkspaceFolder $containerId bash - '')) + (pkgs.writeShellScriptBin "devcontainer-open" ( + let + jq = "${pkgs.jq}/bin/jq"; + devcontainer = "${pkgs.devcontainer}/bin/devcontainer"; + in '' + res=$(${devcontainer} up --workspace-folder .) + outcome=$(echo $res | ${jq} -r '.outcome') + [[ $outcome = "success" ]] || exit 1 + containerId=$(echo $res | ${jq} -r '.containerId') + remoteWorkspaceFolder=$(echo $res | ${jq} -r '.remoteWorkspaceFolder') + docker exec -it --workdir=$remoteWorkspaceFolder $containerId bash + '' + )) ]; home.sessionVariables = { diff --git a/home/workstation.nix b/home/workstation.nix index 43aeaf6..481408b 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -28,6 +28,7 @@ playerctl quickemu devenv + logseq ]; services.udiskie = { @@ -37,7 +38,7 @@ programs.rbw.settings.pinentry = pkgs.pinentry-gnome3; - # https://docs.pipewire.org/page_module_raop_discover.html + # https://docs.pipewire.org/page_module_raop_discover.html xdg.configFile."pipewire/pipewire.conf.d/raop-discover.conf".text = '' context.modules = [ { @@ -47,28 +48,28 @@ ] ''; xdg.configFile."pipewire/pipewire.conf.d/raop-sink.conf".text = '' - context.modules = [ - { name = libpipewire-module-raop-sink - args = { - # Set the remote address to tunnel to - raop.ip = "127.0.0.1" - raop.port = 8190 - raop.name = "my-raop-device" - raop.hostname = "My Service" - #raop.transport = "udp" - raop.encryption.type = "RSA" - #raop.audio.codec = "PCM" - #raop.password = "****" - #audio.format = "S16" - #audio.rate = 44100 - #audio.channels = 2 - #audio.position = [ FL FR ] - stream.props = { - # extra sink properties - } - } - } - ] + context.modules = [ + { name = libpipewire-module-raop-sink + args = { + # Set the remote address to tunnel to + raop.ip = "127.0.0.1" + raop.port = 8190 + raop.name = "my-raop-device" + raop.hostname = "My Service" + #raop.transport = "udp" + raop.encryption.type = "RSA" + #raop.audio.codec = "PCM" + #raop.password = "****" + #audio.format = "S16" + #audio.rate = 44100 + #audio.channels = 2 + #audio.position = [ FL FR ] + stream.props = { + # extra sink properties + } + } + } + ] ''; services.gnome-keyring.enable = true; diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 51f80c6..f98f4a0 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -1,9 +1,14 @@ -{pkgs, ...}: let +{ + pkgs, + lib, + ... +}: let lua = cmd: {__raw = cmd;}; - luaFunc = cmd: lua '' - function () - ${cmd} - end''; + luaFunc = cmd: + lua '' + function () + ${cmd} + end''; in { globals = { mapleader = " "; @@ -28,6 +33,8 @@ in { "extends:>" "precedes:<" ]; + + foldlevel = 2; }; extraPlugins = [(pkgs.vimPlugins.actions-preview-nvim)]; extraConfigLua = '' @@ -204,30 +211,32 @@ in { } ]; - autoCmd = [{ - event = "BufWritePre"; - pattern = "*.go"; - # https://github.com/golang/tools/blob/master/gopls/doc/vim.md#imports-and-formatting - callback = luaFunc '' - local params = vim.lsp.util.make_range_params() - params.context = {only = {"source.organizeImports"}} - -- buf_request_sync defaults to a 1000ms timeout. Depending on your - -- machine and codebase, you may want longer. Add an additional - -- argument after params if you find that you have to write the file - -- twice for changes to be saved. - -- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000) - local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params) - for cid, res in pairs(result or {}) do - for _, r in pairs(res.result or {}) do - if r.edit then - local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16" - vim.lsp.util.apply_workspace_edit(r.edit, enc) + autoCmd = [ + { + event = "BufWritePre"; + pattern = "*"; + # https://github.com/golang/tools/blob/master/gopls/doc/vim.md#imports-and-formatting + callback = luaFunc '' + local params = vim.lsp.util.make_range_params() + params.context = {only = {"source.organizeImports"}} + -- buf_request_sync defaults to a 1000ms timeout. Depending on your + -- machine and codebase, you may want longer. Add an additional + -- argument after params if you find that you have to write the file + -- twice for changes to be saved. + -- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000) + local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params) + for cid, res in pairs(result or {}) do + for _, r in pairs(res.result or {}) do + if r.edit then + local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16" + vim.lsp.util.apply_workspace_edit(r.edit, enc) + end end end - end - vim.lsp.buf.format({async = false}) - ''; - }]; + vim.lsp.buf.format({async = false}) + ''; + } + ]; plugins = { bufferline.enable = true; @@ -261,7 +270,15 @@ in { enable = true; servers = { ts-ls.enable = true; - nil-ls.enable = true; + nixd = { + enable = true; + settings = { + nixpkgs.expr = ''import {}''; + options.zenix.expr = ''(builtins.getFlake "git+https://git.tristans.cloud/tristan/nix").nixosConfigurations.zenix.options''; + options.alpine.expr = ''(builtins.getFlake "git+https://git.tristans.cloud/tristan/nix").nixosConfigurations.alpine.options''; + formatting.command = [(lib.getExe pkgs.alejandra)]; + }; + }; yamlls.enable = true; gopls.enable = true; }; diff --git a/nixos/programs/libvertd.nix b/nixos/programs/libvertd.nix index b7500d9..d251279 100644 --- a/nixos/programs/libvertd.nix +++ b/nixos/programs/libvertd.nix @@ -1,7 +1,6 @@ {config, ...}: let user = config.user; -in -{ +in { users.users.${user}.extraGroups = ["libvirtd" "kvm"]; virtualisation.libvirtd = { enable = true; From 5df2f606da719ccd89d84f4c7f5360eb924ffbf9 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 24 Oct 2024 11:01:38 +0100 Subject: [PATCH 50/65] nixbook: more git config, rerere --- home/default.nix | 1 - home/programs/git.nix | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/home/default.nix b/home/default.nix index 6d7549f..6b72153 100644 --- a/home/default.nix +++ b/home/default.nix @@ -39,7 +39,6 @@ tree ansible ytfzf - lazygit ]; programs.zoxide.enable = true; diff --git a/home/programs/git.nix b/home/programs/git.nix index 20c04ac..2ff8837 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -1,7 +1,16 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + config, + ... +}: { programs.git = { enable = true; + extraConfig = { + rerere.enabled = true; + }; aliases = { + ui = "!lazygit"; graph = "log --oneline --all --graph"; amend = "commit --amend --no-edit"; sdiff = "diff --staged"; @@ -38,4 +47,8 @@ enable = true; }; }; + + programs.lazygit = { + enable = true; + }; } From 62d9f9ef411ab857fd938a847d56854e1e4ebf09 Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 28 Oct 2024 12:24:31 +0000 Subject: [PATCH 51/65] nixbook: update, tweaks --- flake.lock | 226 +++++++++++++++++++------------- flake.nix | 8 +- home/default.nix | 1 - home/desktop/cosmic/default.nix | 3 + home/programs/git.nix | 1 + home/workstation.nix | 3 +- lib/mkconf.nix | 9 +- lib/nixvim.nix | 27 +++- nixos/modules/work.nix | 2 + nixos/programs/cosmic.nix | 2 +- nixos/workstation.nix | 2 +- 11 files changed, 182 insertions(+), 102 deletions(-) diff --git a/flake.lock b/flake.lock index e1826e6..1d82a64 100644 --- a/flake.lock +++ b/flake.lock @@ -74,11 +74,11 @@ ] }, "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "owner": "numtide", "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -226,11 +226,11 @@ ] }, "locked": { - "lastModified": 1726745158, - "narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=", + "lastModified": 1729104314, + "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74", + "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", "type": "github" }, "original": { @@ -278,31 +278,10 @@ "type": "github" } }, - "home-manager": { + "hm-cosmic": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727346017, - "narHash": "sha256-z7OCFXXxIseJhEHiCkkUOkYxD9jtLU8Kf5Q9WC0SjJ8=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "c124568e1054a62c20fbe036155cc99237633327", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager-cosmic": { - "inputs": { - "home-manager": "home-manager_2", - "home-manager-cosmic": "home-manager-cosmic_2" + "home-manager": "home-manager", + "home-manager-cosmic": "home-manager-cosmic" }, "locked": { "lastModified": 1729637091, @@ -319,7 +298,26 @@ "type": "github" } }, - "home-manager-cosmic_2": { + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1729551526, + "narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "5ec753a1fc4454df9285d8b3ec0809234defb975", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager-cosmic": { "inputs": { "nixpkgs": "nixpkgs_2" }, @@ -340,14 +338,16 @@ }, "home-manager_2": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1729551526, - "narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=", + "lastModified": 1729894599, + "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", "owner": "nix-community", "repo": "home-manager", - "rev": "5ec753a1fc4454df9285d8b3ec0809234defb975", + "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", "type": "github" }, "original": { @@ -365,11 +365,11 @@ ] }, "locked": { - "lastModified": 1726985855, - "narHash": "sha256-NJPGK030Y3qETpWBhj9oobDQRbXdXOPxtu+YgGvZ84o=", + "lastModified": 1729894599, + "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", "owner": "nix-community", "repo": "home-manager", - "rev": "04213d1ce4221f5d9b40bcee30706ce9a91d148d", + "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", "type": "github" }, "original": { @@ -399,6 +399,34 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729544999, + "narHash": "sha256-YcyJLvTmN6uLEBGCvYoMLwsinblXMkoYkNLEO4WnKus=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "65c207c92befec93e22086da9456d3906a4e999c", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.5", + "repo": "ixx", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -407,11 +435,11 @@ ] }, "locked": { - "lastModified": 1727003835, - "narHash": "sha256-Cfllbt/ADfO8oxbT984MhPHR6FJBaglsr1SxtDGbpec=", + "lastModified": 1729826725, + "narHash": "sha256-w3WNlYxqWYsuzm/jgFPyhncduoDNjot28aC8j39TW0U=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "bd7d1e3912d40f799c5c0f7e5820ec950f1e0b3d", + "rev": "7840909b00fbd5a183008a6eb251ea307fe4a76e", "type": "github" }, "original": { @@ -423,18 +451,16 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1727314564, - "narHash": "sha256-UE98O6EQYUiDp7rypkBfJG0XSz0c5FxkslyP+7Gskt8=", + "lastModified": 1729906530, + "narHash": "sha256-9hZQO3Ll2tP2Jw+msNuHg+Sa4l7aqJ0TMjx5DH3fUZQ=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "f2aa34f521da1d6335301fc1b58dde8ed779d632", + "rev": "ba83685fb3f4422dfcf3c01a0b3a9dc4b803714d", "type": "github" }, "original": { @@ -461,11 +487,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1727129439, - "narHash": "sha256-nPyrcFm6FSk7CxzVW4x2hu62aLDghNcv9dX6DF3dXw8=", + "lastModified": 1729691686, + "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "babc25a577c3310cce57c72d5bed70f4c3c3843a", + "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", "type": "github" }, "original": { @@ -477,11 +503,26 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1725762081, - "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=", + "lastModified": 1729691686, + "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05", + "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" + } + }, + "nixpkgs-stable_3": { + "locked": { + "lastModified": 1729357638, + "narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22", "type": "github" }, "original": { @@ -509,26 +550,27 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1727122398, - "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", + "lastModified": 1729665710, + "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093", + "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "NixOS", "ref": "nixos-unstable", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs_4": { "locked": { - "lastModified": 1725534445, - "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=", + "lastModified": 1729265718, + "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39", + "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", "type": "github" }, "original": { @@ -569,11 +611,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1727328717, - "narHash": "sha256-tGEVv5mFs38m6+60fNKlZn/6ucoOotfwn9FikXiYSlk=", + "lastModified": 1729945956, + "narHash": "sha256-nWRynowHjpRsDK6uf+VE6fz7/Wk80uRiAV2NQssGBH8=", "owner": "nix-community", "repo": "nixvim", - "rev": "2ab8751b8be55accb78ca0ca58f1f4ff387001d7", + "rev": "2ef948ed8ccf3c93f8caafa93cddca85df5783e9", "type": "github" }, "original": { @@ -585,17 +627,18 @@ "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils", + "ixx": "ixx", "nixpkgs": [ "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1726995581, - "narHash": "sha256-lgsE/CTkZk9OIiFGEIrxXZQ7Feiv41dqlN7pEfTdgew=", + "lastModified": 1729809697, + "narHash": "sha256-r3jMdRyG1ozydtmaze2Ah4OL81Y7567kbWvvME8Js/Q=", "owner": "NuschtOS", "repo": "search", - "rev": "3b7dd61b365ca45380707453758a45f2e9977be3", + "rev": "b35c0b1cbbcc42161c07c77419c2801d461f1401", "type": "github" }, "original": { @@ -606,10 +649,14 @@ }, "root": { "inputs": { - "home-manager": "home-manager", - "home-manager-cosmic": "home-manager-cosmic", + "hm-cosmic": "hm-cosmic", + "home-manager": "home-manager_2", "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2", "nixvim": "nixvim", "sops-nix": "sops-nix", "stylix": "stylix" @@ -623,11 +670,11 @@ ] }, "locked": { - "lastModified": 1727231386, - "narHash": "sha256-XLloPtQHKk/Tdt8t8zIb+JhmunlH3YB9Jz8RTlQ3N/4=", + "lastModified": 1729823394, + "narHash": "sha256-RiinJqorqSLKh1oSpiMHnBe6nQdJzE45lX6fSnAuDnI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b5f76c3b09a8194889f5328a480fbea1a9115518", + "rev": "7e52e80f5faa374ad4c607d62c6d362589cb523f", "type": "github" }, "original": { @@ -639,14 +686,14 @@ "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_4", - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { - "lastModified": 1726524647, - "narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=", + "lastModified": 1729931925, + "narHash": "sha256-3tjYImjVzsSM4sU+wTySF94Yop1spI/XomMBEpljKvQ=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e2d404a7ea599a013189aa42947f66cede0645c8", + "rev": "b2211d1a537136cc1d0d5c0af391e8712016b34e", "type": "github" }, "original": { @@ -672,11 +719,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1727355527, - "narHash": "sha256-qFSPHeImI00fBzGTA94D66HMD+fJDkuz04WHp2Sg8eA=", + "lastModified": 1729963473, + "narHash": "sha256-uGjTjvvlGQfQ0yypVP+at0NizI2nrb6kz4wGAqzRGbY=", "owner": "danth", "repo": "stylix", - "rev": "993fcabd83d1e0ee5ea038b87041593cc73c1ebe", + "rev": "04afcfc0684d9bbb24bb1dc77afda7c1843ec93b", "type": "github" }, "original": { @@ -734,16 +781,17 @@ "tinted-kitty": { "flake": false, "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" } }, @@ -771,11 +819,11 @@ ] }, "locked": { - "lastModified": 1726734507, - "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=", + "lastModified": 1729613947, + "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f", + "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 29e8252..76e33fe 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,19 @@ { description = "A flake using my config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; + # nixpkgs.url = "nixpkgs/nixos-unstable"; + nixpkgs.follows = "nixos-cosmic/nixpkgs"; + nixpkgs-stable.url = "nixpkgs/nixos-24.05"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager-cosmic.url = "github:tristanbeedell/hm-cosmic/master"; + hm-cosmic.url = "github:tristanbeedell/hm-cosmic/master"; stylix.url = "github:danth/stylix"; sops-nix.url = "github:Mic92/sops-nix"; nixos-cosmic = { url = "github:lilyinstarlight/nixos-cosmic"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; nixvim = { url = "github:nix-community/nixvim"; diff --git a/home/default.nix b/home/default.nix index 6b72153..0c5f5ff 100644 --- a/home/default.nix +++ b/home/default.nix @@ -37,7 +37,6 @@ yt-dlp fastfetch tree - ansible ytfzf ]; diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index b287c5e..bcfa074 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -21,6 +21,8 @@ in { Super.Shift. "l" = Actions.Move "Right"; Super.Shift. "j" = Actions.Move "Down"; Super.Shift. "k" = Actions.Move "Up"; + Super.Shift. "Right" = Actions.MoveToNextWorkspace; + Super.Shift. "Left" = Actions.MoveToPreviousWorkspace; Super. "1" = Actions.Workspace 1; Super. "2" = Actions.Workspace 2; Super. "3" = Actions.Workspace 3; @@ -81,6 +83,7 @@ in { focus_follows_cursor = true; focus_follows_cursor_delay = 0; cursor_follows_focus = true; + descale_xwayland = true; workspaces = { workspace_layout = "Horizontal"; }; diff --git a/home/programs/git.nix b/home/programs/git.nix index 2ff8837..1e9f122 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -8,6 +8,7 @@ enable = true; extraConfig = { rerere.enabled = true; + rebase.updateRefs = true; }; aliases = { ui = "!lazygit"; diff --git a/home/workstation.nix b/home/workstation.nix index 481408b..125e657 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -2,6 +2,7 @@ config, pkgs, lib, + stable-pkgs, ... }: { imports = [ @@ -28,7 +29,7 @@ playerctl quickemu devenv - logseq + stable-pkgs.logseq ]; services.udiskie = { diff --git a/lib/mkconf.nix b/lib/mkconf.nix index e8b9d34..b593419 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -9,9 +9,15 @@ home-modules ? [], }: let inherit (inputs) home-manager nixpkgs sops-nix nixvim; + stable-pkgs = import inputs.nixpkgs-stable { + inherit system; + config.permittedInsecurePackages = [ + "electron-27.3.11" + ]; + }; in nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + specialArgs = {inherit inputs stable-pkgs;}; inherit system; @@ -25,6 +31,7 @@ in useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "bak"; + extraSpecialArgs = {inherit stable-pkgs;}; users.${user}.imports = home-modules ++ [ diff --git a/lib/nixvim.nix b/lib/nixvim.nix index f98f4a0..106837f 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -10,6 +10,10 @@ ${cmd} end''; in { + colorschemes.base16 = { + enable = true; + colorscheme = "gruvbox-dark-hard"; + }; globals = { mapleader = " "; }; @@ -21,10 +25,10 @@ in { expandtab = true; smartindent = true; scrolloff = 4; + smoothscroll = true; undofile = true; undodir = lua ''vim.fn.expand("$HOME/.local/share/nvim/undo")''; - list = true; listchars = builtins.concatStringsSep "," [ "tab: >" @@ -36,7 +40,10 @@ in { foldlevel = 2; }; - extraPlugins = [(pkgs.vimPlugins.actions-preview-nvim)]; + extraPlugins = [ + (pkgs.vimPlugins.actions-preview-nvim) + (pkgs.vimPlugins.vimwiki) + ]; extraConfigLua = '' require("actions-preview").setup { highlight_command = { @@ -214,7 +221,7 @@ in { autoCmd = [ { event = "BufWritePre"; - pattern = "*"; + pattern = "*.go"; # https://github.com/golang/tools/blob/master/gopls/doc/vim.md#imports-and-formatting callback = luaFunc '' local params = vim.lsp.util.make_range_params() @@ -269,7 +276,7 @@ in { lsp = { enable = true; servers = { - ts-ls.enable = true; + ts_ls.enable = true; nixd = { enable = true; settings = { @@ -281,6 +288,7 @@ in { }; yamlls.enable = true; gopls.enable = true; + ansiblels.enable = true; }; keymaps = { lspBuf = { @@ -375,7 +383,16 @@ in { }; }; - oil.enable = true; + oil = { + enable = true; + settings = { + keymaps = { + "" = "actions.refresh"; + "zh" = "actions.toggle_hidden"; + }; + view_options.show_hidden = true; + }; + }; ts-autotag.enable = true; guess-indent.enable = true; }; diff --git a/nixos/modules/work.nix b/nixos/modules/work.nix index 24d9b2d..f22246a 100644 --- a/nixos/modules/work.nix +++ b/nixos/modules/work.nix @@ -12,10 +12,12 @@ in { "vscode" "steam-run" "postman" + "drawio" # the creator had a hissyfit over a negative review: https://github.com/jgraph/drawio/discussions/4623 ]; nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" # required for mongodb + "electron-27.3.11" ]; networking = { diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix index 140334e..3f1ccb9 100644 --- a/nixos/programs/cosmic.nix +++ b/nixos/programs/cosmic.nix @@ -14,7 +14,7 @@ services.displayManager.cosmic-greeter.enable = true; services.system76-scheduler.enable = true; home-manager.users.${config.user}.imports = [ - (inputs.home-manager-cosmic.homeManagerModules.cosmic) + (inputs.hm-cosmic.homeManagerModules.cosmic) ../../home/desktop/cosmic/. ]; } diff --git a/nixos/workstation.nix b/nixos/workstation.nix index d358c77..b14d2a5 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -52,7 +52,7 @@ useImage = true; }; nixvim = { - transparentBackground.main = true; + enable = false; }; }; }; From 2202ebef0ba83dfbc9a181b970d94310f09e0661 Mon Sep 17 00:00:00 2001 From: tristan Date: Sat, 2 Nov 2024 09:46:12 +0000 Subject: [PATCH 52/65] zenix: plymouth, fixes --- hardware/zenix.nix | 25 ++++++++++++++++--------- home/desktop/hyprland/default.nix | 7 ++++++- home/programs/graphical.nix | 1 - home/programs/personal/default.nix | 3 --- home/programs/work.nix | 1 + nixos/default.nix | 4 ++++ nixos/programs/gamer.nix | 1 + 7 files changed, 28 insertions(+), 14 deletions(-) diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 22ea30e..f0ce359 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -6,7 +6,6 @@ ... }: let user = config.user; - decrypt = import ../lib/decrypt.nix; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -20,7 +19,7 @@ in { boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/2dad5ed6-44cc-4d9d-9392-32afaa7b3909"; + device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = ["subvol=@" "compress=zstd" "autodefrag"]; }; @@ -32,30 +31,38 @@ in { options = ["noatime"]; }; - boot.initrd.postDeviceCommands = pkgs.lib.mkBefore (decrypt { - keydevice = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; - keypartname = "usbkey"; - }); + boot.initrd.luks.devices."usbkey" = { + device = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; + }; boot.initrd.luks.devices."cryptroot" = { device = "/dev/disk/by-uuid/cc0617df-8cbf-4618-abbc-df64c96de151"; keyFileSize = 4096; + preOpenCommands = '' + mkdir -m 0755 -p /key + mount -n -t vfat -o ro /dev/mapper/usbkey /key + ''; keyFile = "/key/keyfile"; preLVM = false; }; fileSystems."/home" = { - device = "/dev/disk/by-uuid/2dad5ed6-44cc-4d9d-9392-32afaa7b3909"; + device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = ["subvol=@home" "compress=zstd" "autodefrag"]; }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/FE7E-0DE3"; + device = "/dev/disk/by-label/boot"; fsType = "vfat"; }; - swapDevices = [{device = "/dev/disk/by-uuid/da57b489-ab77-4830-b710-9f96cf43d053";}]; + boot.plymouth.enable = true; + boot.initrd.verbose = false; + boot.consoleLogLevel = 1; + boot.kernelParams = ["quiet" "udev.log_level=3"]; + + swapDevices = [{device = "/dev/disk/by-label/swap";}]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 33fb7a2..3b0c4dd 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -277,5 +277,10 @@ in { enable = true; }; - programs.waybar.settings.mainBar.modules-left = ["hyprland/workspaces" "hyprland/window"]; + programs.waybar = { + settings.mainBar.modules-left = ["hyprland/workspaces" "hyprland/window"]; + systemd.target = "hyprland-session.target"; + }; + + systemd.user.services.hypridle.Install.WantedBy = ["hyprland-session.target"]; } diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 9dc9f03..8215ca1 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -18,7 +18,6 @@ gimp libreoffice dbeaver-bin - drawio # entertainment libsForQt5.kasts diff --git a/home/programs/personal/default.nix b/home/programs/personal/default.nix index a740d23..d56f1e2 100644 --- a/home/programs/personal/default.nix +++ b/home/programs/personal/default.nix @@ -15,9 +15,6 @@ services.nextcloud-client.enable = true; programs.nixvim.plugins = { - lsp = { - servers.gdscript.enable = true; - }; godot.enable = true; dap = { enable = true; diff --git a/home/programs/work.nix b/home/programs/work.nix index 51140b3..7417aba 100644 --- a/home/programs/work.nix +++ b/home/programs/work.nix @@ -22,6 +22,7 @@ in { }; home.packages = [ + pkgs.drawio pkgs.thunderbird pkgs.remmina pkgs.postman diff --git a/nixos/default.nix b/nixos/default.nix index e0a0092..554aec0 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -94,6 +94,10 @@ in { fzf sops lsof + nix-tree + nix-index + nh + jq ]; boot.kernel.sysctl = { diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index b676f2e..bf201a9 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -6,6 +6,7 @@ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "steam" + "steam-unwrapped" "steam-run" "steam-original" "osu-lazer" From 53f5a52ceb6c3d7abcf0ac0bc570a88f9c220997 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 19 Nov 2024 20:40:58 +0000 Subject: [PATCH 53/65] zenix: add musnix and mpd --- flake.lock | 45 ++++++++++++++++-- flake.nix | 4 ++ home/desktop/hyprland/default.nix | 2 +- home/modules/mpd.nix | 77 ------------------------------- home/programs/mpd.nix | 70 ++++++++++++++++++++++++++++ home/programs/mpv.nix | 3 ++ lib/mkconf.nix | 2 +- nixos/services/musnix.nix | 5 ++ 8 files changed, 124 insertions(+), 84 deletions(-) delete mode 100644 home/modules/mpd.nix create mode 100644 home/programs/mpd.nix create mode 100644 nixos/services/musnix.nix diff --git a/flake.lock b/flake.lock index 1d82a64..b79cc25 100644 --- a/flake.lock +++ b/flake.lock @@ -427,6 +427,24 @@ "type": "github" } }, + "musnix": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1730699102, + "narHash": "sha256-xkplzGzjywMPOpfTOw5oXbwuH4X14VfXEa3m10aHqrY=", + "owner": "musnix", + "repo": "musnix", + "rev": "3feabdc65fb3466f07f306fa5f4e9c43234186e6", + "type": "github" + }, + "original": { + "owner": "musnix", + "repo": "musnix", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -451,7 +469,7 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "rust-overlay": "rust-overlay" }, @@ -549,6 +567,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1729665710, "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", @@ -564,7 +598,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1729265718, "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", @@ -580,7 +614,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -651,6 +685,7 @@ "inputs": { "hm-cosmic": "hm-cosmic", "home-manager": "home-manager_2", + "musnix": "musnix", "nixos-cosmic": "nixos-cosmic", "nixpkgs": [ "nixos-cosmic", @@ -685,7 +720,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { @@ -712,7 +747,7 @@ "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", diff --git a/flake.nix b/flake.nix index 76e33fe..6b148b9 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "A flake using my config"; inputs = { # nixpkgs.url = "nixpkgs/nixos-unstable"; + musnix.url = "github:musnix/musnix"; nixpkgs.follows = "nixos-cosmic/nixpkgs"; nixpkgs-stable.url = "nixpkgs/nixos-24.05"; home-manager = { @@ -38,9 +39,12 @@ ./nixos/programs/cosmic.nix ./nixos/programs/gamer.nix ./nixos/programs/personal.nix + ./nixos/services/musnix.nix ./nixos/workstation.nix + ./nixos/programs/hyprland.nix ]; home-modules = [ + ./home/programs/mpd.nix ./home/programs/graphical.nix ./home/programs/gamer.nix ./home/programs/personal/. diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 3b0c4dd..901f301 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -23,7 +23,7 @@ in { xdg.portal = { enable = true; configPackages = [pkgs.hyprland]; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; + extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr]; }; services.hypridle = { diff --git a/home/modules/mpd.nix b/home/modules/mpd.nix deleted file mode 100644 index 3586214..0000000 --- a/home/modules/mpd.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -with lib; let - cfg = config.roles.mpd; - terminal = config.programs.terminal; - termcmd = "${terminal}/bin/${terminal.pname}"; -in { - options.roles.mpd = { - enable = mkEnableOption "setup mpd client"; - host = mkOption {default = "192.168.1.2";}; - }; - - config = mkIf cfg.enable { - programs.ncmpcpp = { - enable = true; - settings.mpd_host = cfg.host; - bindings = [ - { - key = "j"; - command = "scroll_down"; - } - { - key = "k"; - command = "scroll_up"; - } - { - key = "l"; - command = "next_column"; - } - { - key = "h"; - command = "previous_column"; - } - { - key = "J"; - command = ["select_item" "scroll_down"]; - } - { - key = "K"; - command = ["select_item" "scroll_up"]; - } - ]; - }; - services.mpd-mpris = { - enable = true; - mpd.host = cfg.host; - }; - programs.waybar.settings.mainBar.mpd.server = cfg.host; - programs.scripts = [ - { - name = "ncmpcpp"; - text = '' - ${termcmd} -e ${pkgs.ncmpcpp}/bin/ncmpcpp - ''; - hotkeys = [{key = "M";}]; - install = false; - } - ]; - systemd.user.services = { - snapclient = { - Unit = { - Description = "Snapclient"; - }; - Service = { - ExecStart = "${pkgs.snapcast}/bin/snapclient -h ${cfg.host}"; - }; - Install = { - WantedBy = ["graphical-session.target"]; - }; - }; - }; - }; -} diff --git a/home/programs/mpd.nix b/home/programs/mpd.nix new file mode 100644 index 0000000..ba20bc9 --- /dev/null +++ b/home/programs/mpd.nix @@ -0,0 +1,70 @@ +{ + lib, + pkgs, + config, + ... +}: +let + terminal = config.programs.terminal; + termcmd = "${terminal}/bin/${terminal.pname}"; + host = "alpine"; +in { + programs.ncmpcpp = { + enable = true; + settings.mpd_host = host; + bindings = [ + { + key = "j"; + command = "scroll_down"; + } + { + key = "k"; + command = "scroll_up"; + } + { + key = "l"; + command = "next_column"; + } + { + key = "h"; + command = "previous_column"; + } + { + key = "J"; + command = ["select_item" "scroll_down"]; + } + { + key = "K"; + command = ["select_item" "scroll_up"]; + } + ]; + }; + services.mpd-mpris = { + enable = true; + mpd.host = host; + }; + programs.waybar.settings.mainBar.mpd.server = host; + programs.scripts = [ + { + name = "ncmpcpp"; + text = '' + ${termcmd} -e ${pkgs.ncmpcpp}/bin/ncmpcpp + ''; + hotkeys = [{key = "M";}]; + install = false; + } + ]; + systemd.user.services = { + snapclient = { + Unit = { + Description = "Snapclient"; + }; + Service = { + ExecStart = "${pkgs.snapcast}/bin/snapclient -h ${host}"; + }; + Install = { + WantedBy = ["graphical-session.target"]; + }; + }; + }; +} diff --git a/home/programs/mpv.nix b/home/programs/mpv.nix index a0e14c5..2708f35 100644 --- a/home/programs/mpv.nix +++ b/home/programs/mpv.nix @@ -1,6 +1,9 @@ {pkgs, ...}: { programs.mpv = { enable = true; + config = { + keep-open = true; + }; bindings = { l = "seek 5"; h = "seek -5"; diff --git a/lib/mkconf.nix b/lib/mkconf.nix index b593419..ebe62af 100644 --- a/lib/mkconf.nix +++ b/lib/mkconf.nix @@ -17,7 +17,7 @@ }; in nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs stable-pkgs;}; + specialArgs = {inherit inputs stable-pkgs user userFullname;}; inherit system; diff --git a/nixos/services/musnix.nix b/nixos/services/musnix.nix new file mode 100644 index 0000000..ed3b7c1 --- /dev/null +++ b/nixos/services/musnix.nix @@ -0,0 +1,5 @@ +{ inputs, user, ... }: { + imports = [inputs.musnix.nixosModules.musnix]; + users.users.${user}.extraGroups = ["music"]; + musnix.enable = true; +} From 5f36a77c4a7f0690653428de18049efae083b58f Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 20 Nov 2024 21:17:36 +0000 Subject: [PATCH 54/65] zenix: update, add gamescope session --- flake.lock | 184 ++++++++++++++---------------- home/desktop/hyprland/default.nix | 25 ++-- home/programs/scripts.nix | 4 +- nixos/programs/gamer.nix | 4 + nixos/workstation.nix | 1 + 5 files changed, 103 insertions(+), 115 deletions(-) diff --git a/flake.lock b/flake.lock index b79cc25..6d8d2ad 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1708890466, - "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "lastModified": 1731966541, + "narHash": "sha256-AhX8QQBQLRqEWHftFibTmvlmh157134vzBYXW0LOBKo=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "665b3c6748534eb766c777298721cece9453fdae", + "rev": "d8e769add6333892b44afc107f193074a5072717", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -159,11 +159,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -196,11 +196,11 @@ "fromYaml": { "flake": false, "locked": { - "lastModified": 1689549921, - "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", "owner": "SenchoPens", "repo": "fromYaml", - "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", "type": "github" }, "original": { @@ -226,11 +226,11 @@ ] }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { @@ -284,11 +284,11 @@ "home-manager-cosmic": "home-manager-cosmic" }, "locked": { - "lastModified": 1729637091, - "narHash": "sha256-nrzQMU4Y+ASKzCzugapaexKxhNXvFLrFmqPcLR0H7Yk=", + "lastModified": 1730635448, + "narHash": "sha256-uiCjKnPIxecu2AgwXhv364jJ2lMj63H176wVr9BXOcU=", "owner": "tristanbeedell", "repo": "hm-cosmic", - "rev": "0a12abbd1b52142d187cddb9050a0a7a14297b09", + "rev": "68f10385a60122f13ed311a4d4690e570fbeff2f", "type": "github" }, "original": { @@ -303,11 +303,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1729551526, - "narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=", + "lastModified": 1730633670, + "narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=", "owner": "nix-community", "repo": "home-manager", - "rev": "5ec753a1fc4454df9285d8b3ec0809234defb975", + "rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661", "type": "github" }, "original": { @@ -322,11 +322,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1729633506, - "narHash": "sha256-DWJBRqIgR+oziSk38bZTFoMEvrSKREOc61BRyOHgmh8=", + "lastModified": 1730557339, + "narHash": "sha256-3Ki5JnuylPjfcse31LBZdGHOKPShrbhqIQdLjnF7wPY=", "owner": "tristanbeedell", "repo": "home-manager", - "rev": "b826bf8c1d5e3e9600d6dc92563c661f97f60f71", + "rev": "f42688754b25f19409bbd3da55865eeff8edf0c5", "type": "github" }, "original": { @@ -343,11 +343,11 @@ ] }, "locked": { - "lastModified": 1729894599, - "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", + "lastModified": 1732025103, + "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=", "owner": "nix-community", "repo": "home-manager", - "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", + "rev": "a46e702093a5c46e192243edbd977d5749e7f294", "type": "github" }, "original": { @@ -365,11 +365,11 @@ ] }, "locked": { - "lastModified": 1729894599, - "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", + "lastModified": 1731887066, + "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", "owner": "nix-community", "repo": "home-manager", - "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", + "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", "type": "github" }, "original": { @@ -386,11 +386,11 @@ ] }, "locked": { - "lastModified": 1724435763, - "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", + "lastModified": 1730837930, + "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", "owner": "nix-community", "repo": "home-manager", - "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", + "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", "type": "github" }, "original": { @@ -413,16 +413,16 @@ ] }, "locked": { - "lastModified": 1729544999, - "narHash": "sha256-YcyJLvTmN6uLEBGCvYoMLwsinblXMkoYkNLEO4WnKus=", + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", "owner": "NuschtOS", "repo": "ixx", - "rev": "65c207c92befec93e22086da9456d3906a4e999c", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", "type": "github" }, "original": { "owner": "NuschtOS", - "ref": "v0.0.5", + "ref": "v0.0.6", "repo": "ixx", "type": "github" } @@ -453,11 +453,11 @@ ] }, "locked": { - "lastModified": 1729826725, - "narHash": "sha256-w3WNlYxqWYsuzm/jgFPyhncduoDNjot28aC8j39TW0U=", + "lastModified": 1731885500, + "narHash": "sha256-ZrztYfSOS33J+ewq5alBOSdnIyZ0/sr1iy7FyBe9zIg=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "7840909b00fbd5a183008a6eb251ea307fe4a76e", + "rev": "c60b5c924c6188a0b3ca2e139ead3d0f92ae5db5", "type": "github" }, "original": { @@ -474,11 +474,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1729906530, - "narHash": "sha256-9hZQO3Ll2tP2Jw+msNuHg+Sa4l7aqJ0TMjx5DH3fUZQ=", + "lastModified": 1731973500, + "narHash": "sha256-Fsa6ULL0TS2BnPGtWGeU3pk8JwwdPvxzQISzZD4kcWo=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "ba83685fb3f4422dfcf3c01a0b3a9dc4b803714d", + "rev": "c294772655f83716e69f5585cb8b3aec049998a6", "type": "github" }, "original": { @@ -489,11 +489,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729256560, - "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", "type": "github" }, "original": { @@ -505,11 +505,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1729691686, - "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", + "lastModified": 1731386116, + "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", + "rev": "689fed12a013f56d4c4d3f612489634267d86529", "type": "github" }, "original": { @@ -521,11 +521,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1729691686, - "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", + "lastModified": 1731797254, + "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", + "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", "type": "github" }, "original": { @@ -534,22 +534,6 @@ "type": "indirect" } }, - "nixpkgs-stable_3": { - "locked": { - "lastModified": 1729357638, - "narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1729256560, @@ -584,11 +568,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1729665710, - "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", + "lastModified": 1731319897, + "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", + "rev": "dc460ec76cbff0e66e269457d7b728432263166c", "type": "github" }, "original": { @@ -600,11 +584,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1729265718, - "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", + "lastModified": 1731763621, + "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", + "rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d", "type": "github" }, "original": { @@ -616,11 +600,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1725194671, - "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", + "lastModified": 1731531548, + "narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", + "rev": "24f0d4acd634792badd6470134c387a3b039dace", "type": "github" }, "original": { @@ -645,11 +629,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1729945956, - "narHash": "sha256-nWRynowHjpRsDK6uf+VE6fz7/Wk80uRiAV2NQssGBH8=", + "lastModified": 1732035679, + "narHash": "sha256-J03v1XnxvsrrvHmzKVBZiwik8678IXfkH1/ZR954ujk=", "owner": "nix-community", "repo": "nixvim", - "rev": "2ef948ed8ccf3c93f8caafa93cddca85df5783e9", + "rev": "929bb0cd1cffb9917ab14be9cdb3f27efd6f505f", "type": "github" }, "original": { @@ -668,11 +652,11 @@ ] }, "locked": { - "lastModified": 1729809697, - "narHash": "sha256-r3jMdRyG1ozydtmaze2Ah4OL81Y7567kbWvvME8Js/Q=", + "lastModified": 1731936508, + "narHash": "sha256-z0BSSf78LkxIrrFXZYmCoRRAxAmxMUKpK7CyxQRvkZI=", "owner": "NuschtOS", "repo": "search", - "rev": "b35c0b1cbbcc42161c07c77419c2801d461f1401", + "rev": "fe07070f811b717a4626d01fab714a87d422a9e1", "type": "github" }, "original": { @@ -705,11 +689,11 @@ ] }, "locked": { - "lastModified": 1729823394, - "narHash": "sha256-RiinJqorqSLKh1oSpiMHnBe6nQdJzE45lX6fSnAuDnI=", + "lastModified": 1731551344, + "narHash": "sha256-wr8OOqgw7M1pWfe4W7WA5lErzOVMg3zvrrxx/dy/nPo=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7e52e80f5faa374ad4c607d62c6d362589cb523f", + "rev": "27570abfd3461875f11fc07c9b01c141a6332b4f", "type": "github" }, "original": { @@ -720,15 +704,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_5", - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1729931925, - "narHash": "sha256-3tjYImjVzsSM4sU+wTySF94Yop1spI/XomMBEpljKvQ=", + "lastModified": 1731954233, + "narHash": "sha256-vvXx1m2Rsw7MkbKJdpcICzz4YPgZPApGKQGhNZfkhOI=", "owner": "Mic92", "repo": "sops-nix", - "rev": "b2211d1a537136cc1d0d5c0af391e8712016b34e", + "rev": "e39947d0ee8e341fa7108bd02a33cdfa24a1360e", "type": "github" }, "original": { @@ -754,11 +737,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1729963473, - "narHash": "sha256-uGjTjvvlGQfQ0yypVP+at0NizI2nrb6kz4wGAqzRGbY=", + "lastModified": 1732036949, + "narHash": "sha256-prZV8HDVvBqHiJLkjElJYoZ6zonV7cOABb8Z0lWonJA=", "owner": "danth", "repo": "stylix", - "rev": "04afcfc0684d9bbb24bb1dc77afda7c1843ec93b", + "rev": "4912f4db00bc931c7636d827e829faf01f6bf155", "type": "github" }, "original": { @@ -800,16 +783,17 @@ "tinted-foot": { "flake": false, "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", "owner": "tinted-theming", "repo": "tinted-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", "type": "github" } }, @@ -854,11 +838,11 @@ ] }, "locked": { - "lastModified": 1729613947, - "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", + "lastModified": 1731944360, + "narHash": "sha256-sJxPh+V0vUkBhlA58ok/y0o96AtfqiEF0O8qsdolI6o=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", + "rev": "579b9a2fd0020cd9cd81a4ef4eab2dca4d20c94c", "type": "github" }, "original": { diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 901f301..d2a13a8 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -52,7 +52,7 @@ in { programs.hyprlock = { enable = true; - settings = { + settings = lib.mkForce { # https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/ general = { hide_cursor = true; @@ -88,8 +88,9 @@ in { enable = true; systemd = { enable = true; - variables = ["--all"]; + # variables = ["--all"]; }; + xwayland.enable = true; settings = { input = { touchpad = { @@ -105,7 +106,6 @@ in { }; decoration = { rounding = 0; - drop_shadow = false; }; bezier = [ "overshot, 0.05, 0.9, 0.1, 1.1" @@ -183,17 +183,14 @@ in { "${modifier}, mouse:272, movewindow" "${modifier}, mouse:273, resizewindow" ]; - env = [ - "GDK_BACKEND,wayland,x11" - "QT_QPA_PLATFORM,wayland;xcb" - "SDL_VIDEODRIVER,wayland" - "CLUTTER_BACKEND,wayland" - "XDG_CURRENT_DESKTOP,Hyprland" - "XDG_SESSION_TYPE,wayland" - "XDG_SESSION_DESKTOP,Hyprland" - "QT_AUTO_SCREEN_SCALE_FACTOR,1" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - ]; + # env = [ + # "GDK_BACKEND,wayland,x11" + # "QT_QPA_PLATFORM,wayland;xcb" + # "CLUTTER_BACKEND,wayland" + # "XDG_SESSION_TYPE,wayland" + # "QT_AUTO_SCREEN_SCALE_FACTOR,1" + # "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + # ]; windowrule = [ "float, title:wlogout" "idleinhibit always, vrmonitor" diff --git a/home/programs/scripts.nix b/home/programs/scripts.nix index 8673d76..f0943e0 100644 --- a/home/programs/scripts.nix +++ b/home/programs/scripts.nix @@ -274,11 +274,13 @@ in { text = '' res=$(echo "lock sleep - hibernate" | ${my-deps.menu}) + hibernate + logout" | ${my-deps.menu}) case $res in lock) ${my-deps.lock};; sleep) systemctl suspend;; hibernate) systemctl hibernate;; + logout) hyprctl dispatch exit;; esac ''; hotkeys = [ diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index bf201a9..6558ddb 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -19,6 +19,10 @@ ]; remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; + gamescopeSession = { + enable = true; + args = ["-r" "144" "-O" "DP-1"]; + }; }; programs.gamemode.enable = true; services.monado.enable = true; diff --git a/nixos/workstation.nix b/nixos/workstation.nix index b14d2a5..faf5e7c 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -48,6 +48,7 @@ }; targets = { gtk.enable = false; # fails to switch with cosmic overriding it (grr) + gnome.enable = false; grub = { useImage = true; }; From 34fa25d4637d7c09f0168f12d359845e89b0c97a Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 22 Nov 2024 18:09:06 +0000 Subject: [PATCH 55/65] zenix: fix audio group and add gamescope capsysnice --- nixos/programs/gamer.nix | 6 +++++- nixos/services/musnix.nix | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index 6558ddb..245761f 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -21,9 +21,13 @@ dedicatedServer.openFirewall = true; gamescopeSession = { enable = true; - args = ["-r" "144" "-O" "DP-1"]; + args = ["-r" "144" "-O" "DP-1" "--rt"]; }; }; + programs.gamescope = { + enable = true; + capSysNice = true; + }; programs.gamemode.enable = true; services.monado.enable = true; systemd.user.services.monado.environment = { diff --git a/nixos/services/musnix.nix b/nixos/services/musnix.nix index ed3b7c1..ce62cd6 100644 --- a/nixos/services/musnix.nix +++ b/nixos/services/musnix.nix @@ -1,5 +1,5 @@ { inputs, user, ... }: { imports = [inputs.musnix.nixosModules.musnix]; - users.users.${user}.extraGroups = ["music"]; + users.users.${user}.extraGroups = ["audio"]; musnix.enable = true; } From c4bd5f1cf81eaa20ce734c0e71cd6cf04cf22a60 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 24 Nov 2024 22:18:55 +0000 Subject: [PATCH 56/65] zenix: cosmic add audio control hotkeys --- home/desktop/cosmic/default.nix | 8 ++++++++ home/programs/personal/default.nix | 3 --- nixos/programs/kodi.nix | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 nixos/programs/kodi.nix diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index bcfa074..cbad767 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -5,6 +5,8 @@ ... }: let inherit (config.lib.cosmic) Actions mapBinds; + SpawnTerminal = name: pkg: + Actions.Spawn (pkgs.writeShellScriptBin name "${lib.getExe pkgs.alacritty} -e ${lib.getExe pkg}"); in { programs.cosmic = { enable = true; @@ -42,8 +44,14 @@ in { # System Super. "d" = Actions.Spawn config.programs.menu.drunCommand; Super. "Return" = Actions.Spawn pkgs.alacritty; + Super. "e" = SpawnTerminal "aerc" config.programs.aerc.package; Super. "o" = Actions.System "HomeFolder"; Super.Shift. "s" = Actions.System "Screenshot"; + "XF86AudioRaiseVolume" = Actions.System "VolumeRaise"; + "XF86AudioLowerVolume" = Actions.System "VolumeLower"; + "XF86AudioPlay" = Actions.System "PlayPause"; + "XF86AudioNext" = Actions.System "PlayNext"; + "XF86AudioPrev" = Actions.System "PlayPrev"; }; background = { displays = { diff --git a/home/programs/personal/default.nix b/home/programs/personal/default.nix index d56f1e2..703a94b 100644 --- a/home/programs/personal/default.nix +++ b/home/programs/personal/default.nix @@ -1,7 +1,4 @@ {pkgs, ...}: { - imports = [ - # ./kodi.nix - ]; roles.email = { enable = true; email = "tristan@tristans.cloud"; diff --git a/nixos/programs/kodi.nix b/nixos/programs/kodi.nix new file mode 100644 index 0000000..2f210e0 --- /dev/null +++ b/nixos/programs/kodi.nix @@ -0,0 +1,14 @@ +{pkgs, ...}: { + services.xserver.desktopManager.kodi = { + enable = true; + package = + pkgs.kodi.withPackages + (exts: + with exts; [ + jellyfin + steam-launcher + joystick + youtube + ]); + }; +} From bf8e3e78d805941ae7170cd900a2217e8ed3dc04 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 26 Nov 2024 03:04:17 +0000 Subject: [PATCH 57/65] nixbook: replace usbkey --- flake.nix | 2 ++ hardware/fcs-tristan-nixbook.nix | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 6b148b9..cead99f 100644 --- a/flake.nix +++ b/flake.nix @@ -58,8 +58,10 @@ ./nixos/modules/work.nix ./nixos/programs/cosmic.nix ./nixos/programs/libvertd.nix + ./nixos/programs/hyprland.nix ]; home-modules = [ + ./home/programs/mpd.nix ./home/programs/work.nix ./home/programs/graphical.nix ]; diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index a3370d4..bcc1900 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -6,7 +6,6 @@ ... }: let user = config.user; - decrypt = import ../lib/decrypt.nix; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -24,7 +23,7 @@ in { }; boot.initrd.luks.devices."usbkey" = { - device = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; + device = "/dev/disk/by-label/usbkey1"; }; boot.initrd.luks.devices."cryptroot" = { @@ -32,7 +31,7 @@ in { keyFileSize = 4096; preOpenCommands = '' mkdir -m 0755 -p /key - mount -n -t vfat -o ro /dev/mapper/usbkey /key + mount -n -o ro /dev/mapper/usbkey /key ''; keyFile = "/key/keyfile"; preLVM = false; From e7acefb8f2afafc2cc708486ceb489c4bd05b8ce Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 29 Nov 2024 20:25:16 +0000 Subject: [PATCH 58/65] zenix: new usbkey --- hardware/zenix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/zenix.nix b/hardware/zenix.nix index f0ce359..e3fe37a 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -32,7 +32,7 @@ in { }; boot.initrd.luks.devices."usbkey" = { - device = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; + device = "/dev/disk/by-label/usbkey1"; }; boot.initrd.luks.devices."cryptroot" = { @@ -40,7 +40,7 @@ in { keyFileSize = 4096; preOpenCommands = '' mkdir -m 0755 -p /key - mount -n -t vfat -o ro /dev/mapper/usbkey /key + mount -n -o ro /dev/mapper/usbkey /key ''; keyFile = "/key/keyfile"; preLVM = false; From 80e205669ba2f6a68e71fd13d36d9a4529690c90 Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 1 Dec 2024 23:52:33 +0000 Subject: [PATCH 59/65] zenix: revert removal of hypr env vars --- home/desktop/hyprland/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index d2a13a8..3b7f364 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -183,14 +183,17 @@ in { "${modifier}, mouse:272, movewindow" "${modifier}, mouse:273, resizewindow" ]; - # env = [ - # "GDK_BACKEND,wayland,x11" - # "QT_QPA_PLATFORM,wayland;xcb" - # "CLUTTER_BACKEND,wayland" - # "XDG_SESSION_TYPE,wayland" - # "QT_AUTO_SCREEN_SCALE_FACTOR,1" - # "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - # ]; + env = [ + "GDK_BACKEND,wayland,x11" + "QT_QPA_PLATFORM,wayland;xcb" + "SDL_VIDEODRIVER,wayland" + "CLUTTER_BACKEND,wayland" + "XDG_CURRENT_DESKTOP,Hyprland" + "XDG_SESSION_TYPE,wayland" + "XDG_SESSION_DESKTOP,Hyprland" + "QT_AUTO_SCREEN_SCALE_FACTOR,1" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + ]; windowrule = [ "float, title:wlogout" "idleinhibit always, vrmonitor" From a2f52e8aa4ada033d50d360d97ff3226a6e4d40a Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 2 Dec 2024 14:09:17 +0000 Subject: [PATCH 60/65] zenix: add freetube and pipe-operators --- home/programs/graphical.nix | 1 + nixos/default.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index 8215ca1..a53e427 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -22,6 +22,7 @@ # entertainment libsForQt5.kasts shortwave + freetube # other element-desktop-wayland diff --git a/nixos/default.nix b/nixos/default.nix index 554aec0..ee802d7 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -14,7 +14,7 @@ in { nix = { settings = { - experimental-features = ["nix-command" "flakes"]; + experimental-features = ["nix-command" "flakes" "pipe-operators"]; }; settings.trusted-users = ["root" user]; From 43c05553ff68f16de2979ba3e2751c6221d9092c Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 10 Dec 2024 14:57:13 +0000 Subject: [PATCH 61/65] add zed, yt music, element-desktop, codesnap --- home/programs/graphical.nix | 7 +++++++ lib/nixvim.nix | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/home/programs/graphical.nix b/home/programs/graphical.nix index a53e427..b174cfb 100644 --- a/home/programs/graphical.nix +++ b/home/programs/graphical.nix @@ -18,14 +18,21 @@ gimp libreoffice dbeaver-bin + zed-editor # entertainment libsForQt5.kasts shortwave freetube + youtube-music # other element-desktop-wayland + (makeDesktopItem { + name = "element-desktop-wayland"; + desktopName = "Element"; + exec = "${element-desktop-wayland}/bin/element-desktop"; + }) brave bitwarden ]; diff --git a/lib/nixvim.nix b/lib/nixvim.nix index 106837f..e6fdace 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -395,5 +395,16 @@ in { }; ts-autotag.enable = true; guess-indent.enable = true; + + codesnap = { + enable = true; + settings = { + has_line_number = true; + mac_window_bar = false; + save_path = "~/Pictures/Screenshots/"; + watermark = ""; + bg_padding = 5; + }; + }; }; } From d65ef277dfdede813ca371bbd4221b0891030603 Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 20 Dec 2024 12:03:22 +0000 Subject: [PATCH 62/65] nixbook: update, add brightness controls --- flake.lock | 178 ++++++++++++++++---------------- home/desktop/cosmic/default.nix | 2 + nixos/workstation.nix | 2 +- 3 files changed, 92 insertions(+), 90 deletions(-) diff --git a/flake.lock b/flake.lock index 6d8d2ad..928b313 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1731966541, - "narHash": "sha256-AhX8QQBQLRqEWHftFibTmvlmh157134vzBYXW0LOBKo=", + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "d8e769add6333892b44afc107f193074a5072717", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "base16-vim": { "flake": false, "locked": { - "lastModified": 1716150083, - "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "lastModified": 1731949548, + "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", "owner": "tinted-theming", "repo": "base16-vim", - "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", "type": "github" }, "original": { @@ -120,11 +120,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -180,11 +180,11 @@ ] }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -226,11 +226,11 @@ ] }, "locked": { - "lastModified": 1731363552, - "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "lastModified": 1734279981, + "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", "type": "github" }, "original": { @@ -264,16 +264,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1713702291, - "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", "type": "github" }, "original": { "owner": "GNOME", - "ref": "46.1", + "ref": "47.2", "repo": "gnome-shell", "type": "github" } @@ -284,11 +284,11 @@ "home-manager-cosmic": "home-manager-cosmic" }, "locked": { - "lastModified": 1730635448, - "narHash": "sha256-uiCjKnPIxecu2AgwXhv364jJ2lMj63H176wVr9BXOcU=", + "lastModified": 1733104727, + "narHash": "sha256-2a4w7OxuncH/qh+eBou65v+Ow7ZH8CobfFId3ckSQdo=", "owner": "tristanbeedell", "repo": "hm-cosmic", - "rev": "68f10385a60122f13ed311a4d4690e570fbeff2f", + "rev": "8c7ae2855827101eff7e52dd320599a487c78936", "type": "github" }, "original": { @@ -303,11 +303,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1730633670, - "narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -322,11 +322,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1730557339, - "narHash": "sha256-3Ki5JnuylPjfcse31LBZdGHOKPShrbhqIQdLjnF7wPY=", + "lastModified": 1733103810, + "narHash": "sha256-S1jGheeLQJPaY80+iFu7Iv4Az3BHmVlv8PxngnK8Aog=", "owner": "tristanbeedell", "repo": "home-manager", - "rev": "f42688754b25f19409bbd3da55865eeff8edf0c5", + "rev": "efa4d272f6c2b14d4a3b67b0b1e4b38ae46e5588", "type": "github" }, "original": { @@ -343,11 +343,11 @@ ] }, "locked": { - "lastModified": 1732025103, - "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=", + "lastModified": 1734344598, + "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", "owner": "nix-community", "repo": "home-manager", - "rev": "a46e702093a5c46e192243edbd977d5749e7f294", + "rev": "83ecd50915a09dca928971139d3a102377a8d242", "type": "github" }, "original": { @@ -365,11 +365,11 @@ ] }, "locked": { - "lastModified": 1731887066, - "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", + "lastModified": 1734093295, + "narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=", "owner": "nix-community", "repo": "home-manager", - "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", + "rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8", "type": "github" }, "original": { @@ -386,11 +386,11 @@ ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -432,11 +432,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1730699102, - "narHash": "sha256-xkplzGzjywMPOpfTOw5oXbwuH4X14VfXEa3m10aHqrY=", + "lastModified": 1734127708, + "narHash": "sha256-fXDr93nc3zUDCGS5qhrXAtwBJfiI40jIdoMncLAzbUY=", "owner": "musnix", "repo": "musnix", - "rev": "3feabdc65fb3466f07f306fa5f4e9c43234186e6", + "rev": "0a2bbd1e2ec78ef268698eb682f39015c1f3ca1d", "type": "github" }, "original": { @@ -453,11 +453,11 @@ ] }, "locked": { - "lastModified": 1731885500, - "narHash": "sha256-ZrztYfSOS33J+ewq5alBOSdnIyZ0/sr1iy7FyBe9zIg=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "c60b5c924c6188a0b3ca2e139ead3d0f92ae5db5", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -474,11 +474,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1731973500, - "narHash": "sha256-Fsa6ULL0TS2BnPGtWGeU3pk8JwwdPvxzQISzZD4kcWo=", + "lastModified": 1734404414, + "narHash": "sha256-c/7bsbMcVMb8c4wiLA142ZQfL08U8qYJROGf9NCkfQE=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "c294772655f83716e69f5585cb8b3aec049998a6", + "rev": "a364e6a5e9eb93253daf93c747b150e31e09b13c", "type": "github" }, "original": { @@ -489,11 +489,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "lastModified": 1732837521, + "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", "type": "github" }, "original": { @@ -505,27 +505,27 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1731386116, - "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", + "lastModified": 1734083684, + "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "689fed12a013f56d4c4d3f612489634267d86529", + "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1731797254, - "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", + "lastModified": 1734202038, + "narHash": "sha256-LwcGIkORU8zfQ/8jAgptgPY8Zf9lGKB0vtNdQyEkaN8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", + "rev": "bcba2fbf6963bf6bed3a749f9f4cf5bff4adb96d", "type": "github" }, "original": { @@ -552,11 +552,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "lastModified": 1733392399, + "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", "type": "github" }, "original": { @@ -568,11 +568,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1731319897, - "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc460ec76cbff0e66e269457d7b728432263166c", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", "type": "github" }, "original": { @@ -600,11 +600,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1731531548, - "narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=", + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "24f0d4acd634792badd6470134c387a3b039dace", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", "type": "github" }, "original": { @@ -629,11 +629,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1732035679, - "narHash": "sha256-J03v1XnxvsrrvHmzKVBZiwik8678IXfkH1/ZR954ujk=", + "lastModified": 1734412481, + "narHash": "sha256-U2CM2IisVgI+iKjkBw0KglyP7DwCIUwTBaz2bhMcTak=", "owner": "nix-community", "repo": "nixvim", - "rev": "929bb0cd1cffb9917ab14be9cdb3f27efd6f505f", + "rev": "30895485c3a31bb16ace513def4f3a36bfeb68c6", "type": "github" }, "original": { @@ -652,11 +652,11 @@ ] }, "locked": { - "lastModified": 1731936508, - "narHash": "sha256-z0BSSf78LkxIrrFXZYmCoRRAxAmxMUKpK7CyxQRvkZI=", + "lastModified": 1733773348, + "narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", "owner": "NuschtOS", "repo": "search", - "rev": "fe07070f811b717a4626d01fab714a87d422a9e1", + "rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", "type": "github" }, "original": { @@ -689,11 +689,11 @@ ] }, "locked": { - "lastModified": 1731551344, - "narHash": "sha256-wr8OOqgw7M1pWfe4W7WA5lErzOVMg3zvrrxx/dy/nPo=", + "lastModified": 1734316514, + "narHash": "sha256-0aLx44yMblcOGpfFXKCzp2GhU5JaE6OTvdU+JYrXiUc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "27570abfd3461875f11fc07c9b01c141a6332b4f", + "rev": "83ee8ff74d6294a7657320f16814754c4594127b", "type": "github" }, "original": { @@ -707,11 +707,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1731954233, - "narHash": "sha256-vvXx1m2Rsw7MkbKJdpcICzz4YPgZPApGKQGhNZfkhOI=", + "lastModified": 1733965552, + "narHash": "sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e39947d0ee8e341fa7108bd02a33cdfa24a1360e", + "rev": "2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004", "type": "github" }, "original": { @@ -737,11 +737,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1732036949, - "narHash": "sha256-prZV8HDVvBqHiJLkjElJYoZ6zonV7cOABb8Z0lWonJA=", + "lastModified": 1734110168, + "narHash": "sha256-Q0eeLYn45ErXlqGQyXmLLHGe1mqnUiK0Y9wZRa1SNFI=", "owner": "danth", "repo": "stylix", - "rev": "4912f4db00bc931c7636d827e829faf01f6bf155", + "rev": "a9e3779949925ef22f5a215c5f49cf520dea30b1", "type": "github" }, "original": { @@ -817,11 +817,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", "type": "github" }, "original": { @@ -838,11 +838,11 @@ ] }, "locked": { - "lastModified": 1731944360, - "narHash": "sha256-sJxPh+V0vUkBhlA58ok/y0o96AtfqiEF0O8qsdolI6o=", + "lastModified": 1733761991, + "narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "579b9a2fd0020cd9cd81a4ef4eab2dca4d20c94c", + "rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085", "type": "github" }, "original": { diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index cbad767..a51d14d 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -52,6 +52,8 @@ in { "XF86AudioPlay" = Actions.System "PlayPause"; "XF86AudioNext" = Actions.System "PlayNext"; "XF86AudioPrev" = Actions.System "PlayPrev"; + "XF86MonBrightnessUp" = Actions.System "BrightnessUp"; + "XF86MonBrightnessDown" = Actions.System "BrightnessDown"; }; background = { displays = { diff --git a/nixos/workstation.nix b/nixos/workstation.nix index faf5e7c..b3e428d 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -65,7 +65,7 @@ ]; fonts.packages = with pkgs; [ - nerdfonts + nerd-fonts.symbols-only interalia ]; From 1a86b02fe4d0e0f8191daa07c1d689a99925369a Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 20 Dec 2024 17:45:47 +0000 Subject: [PATCH 63/65] zenix: update and tidy --- .rgignore | 1 + flake.lock | 178 +++++++++++++++++++-------------------- home/programs/gamer.nix | 7 +- home/programs/xr.nix | 48 ++++++----- nixos/programs/gamer.nix | 5 -- nixos/workstation.nix | 1 - 6 files changed, 117 insertions(+), 123 deletions(-) diff --git a/.rgignore b/.rgignore index 13ba0e2..d9795db 100644 --- a/.rgignore +++ b/.rgignore @@ -1,2 +1,3 @@ lib/words.txt +lib/emotes.txt flake.lock diff --git a/flake.lock b/flake.lock index 6d8d2ad..34c8835 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1731966541, - "narHash": "sha256-AhX8QQBQLRqEWHftFibTmvlmh157134vzBYXW0LOBKo=", + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "d8e769add6333892b44afc107f193074a5072717", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "base16-vim": { "flake": false, "locked": { - "lastModified": 1716150083, - "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "lastModified": 1731949548, + "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", "owner": "tinted-theming", "repo": "base16-vim", - "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", "type": "github" }, "original": { @@ -120,11 +120,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -180,11 +180,11 @@ ] }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -226,11 +226,11 @@ ] }, "locked": { - "lastModified": 1731363552, - "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "lastModified": 1733318908, + "narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "rev": "6f4e2a2112050951a314d2733a994fbab94864c6", "type": "github" }, "original": { @@ -264,16 +264,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1713702291, - "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", "type": "github" }, "original": { "owner": "GNOME", - "ref": "46.1", + "ref": "47.2", "repo": "gnome-shell", "type": "github" } @@ -284,11 +284,11 @@ "home-manager-cosmic": "home-manager-cosmic" }, "locked": { - "lastModified": 1730635448, - "narHash": "sha256-uiCjKnPIxecu2AgwXhv364jJ2lMj63H176wVr9BXOcU=", + "lastModified": 1733104727, + "narHash": "sha256-2a4w7OxuncH/qh+eBou65v+Ow7ZH8CobfFId3ckSQdo=", "owner": "tristanbeedell", "repo": "hm-cosmic", - "rev": "68f10385a60122f13ed311a4d4690e570fbeff2f", + "rev": "8c7ae2855827101eff7e52dd320599a487c78936", "type": "github" }, "original": { @@ -303,11 +303,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1730633670, - "narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -322,11 +322,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1730557339, - "narHash": "sha256-3Ki5JnuylPjfcse31LBZdGHOKPShrbhqIQdLjnF7wPY=", + "lastModified": 1733103810, + "narHash": "sha256-S1jGheeLQJPaY80+iFu7Iv4Az3BHmVlv8PxngnK8Aog=", "owner": "tristanbeedell", "repo": "home-manager", - "rev": "f42688754b25f19409bbd3da55865eeff8edf0c5", + "rev": "efa4d272f6c2b14d4a3b67b0b1e4b38ae46e5588", "type": "github" }, "original": { @@ -343,11 +343,11 @@ ] }, "locked": { - "lastModified": 1732025103, - "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=", + "lastModified": 1733769654, + "narHash": "sha256-aVvYDt8eitZVF6fdOrSoIzYRkQ5Gh6kfRvqkiaDRLL0=", "owner": "nix-community", "repo": "home-manager", - "rev": "a46e702093a5c46e192243edbd977d5749e7f294", + "rev": "e952e94955dcc6fa2120c1430789fc41363f5237", "type": "github" }, "original": { @@ -365,11 +365,11 @@ ] }, "locked": { - "lastModified": 1731887066, - "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", + "lastModified": 1733484277, + "narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", "owner": "nix-community", "repo": "home-manager", - "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", + "rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", "type": "github" }, "original": { @@ -386,11 +386,11 @@ ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -432,11 +432,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1730699102, - "narHash": "sha256-xkplzGzjywMPOpfTOw5oXbwuH4X14VfXEa3m10aHqrY=", + "lastModified": 1733444216, + "narHash": "sha256-Xs+HcLsnMy6Z1FpHr0ULsGMc1mI6ESq1dTBAYwlpuVY=", "owner": "musnix", "repo": "musnix", - "rev": "3feabdc65fb3466f07f306fa5f4e9c43234186e6", + "rev": "a38011b5b96624b7f6527c0bc6df530a263297ad", "type": "github" }, "original": { @@ -453,11 +453,11 @@ ] }, "locked": { - "lastModified": 1731885500, - "narHash": "sha256-ZrztYfSOS33J+ewq5alBOSdnIyZ0/sr1iy7FyBe9zIg=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "c60b5c924c6188a0b3ca2e139ead3d0f92ae5db5", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -474,11 +474,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1731973500, - "narHash": "sha256-Fsa6ULL0TS2BnPGtWGeU3pk8JwwdPvxzQISzZD4kcWo=", + "lastModified": 1733708804, + "narHash": "sha256-PiUrztTiR4aVRC2fMdNcOWYWF1ojvqbrSUYmhtp3970=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "c294772655f83716e69f5585cb8b3aec049998a6", + "rev": "1531210f371ecf966ff67e87975f684553bdbbf7", "type": "github" }, "original": { @@ -489,11 +489,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "lastModified": 1732837521, + "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", "type": "github" }, "original": { @@ -505,27 +505,27 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1731386116, - "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", + "lastModified": 1733412085, + "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "689fed12a013f56d4c4d3f612489634267d86529", + "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1731797254, - "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", + "lastModified": 1733730953, + "narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", + "rev": "7109b680d161993918b0a126f38bc39763e5a709", "type": "github" }, "original": { @@ -552,11 +552,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "lastModified": 1732837521, + "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", "type": "github" }, "original": { @@ -568,11 +568,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1731319897, - "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc460ec76cbff0e66e269457d7b728432263166c", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "type": "github" }, "original": { @@ -600,11 +600,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1731531548, - "narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=", + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "24f0d4acd634792badd6470134c387a3b039dace", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", "type": "github" }, "original": { @@ -629,11 +629,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1732035679, - "narHash": "sha256-J03v1XnxvsrrvHmzKVBZiwik8678IXfkH1/ZR954ujk=", + "lastModified": 1733839233, + "narHash": "sha256-D+u1Nx6ZwdrqC70hbAvZJC1uVIsLEUdLk1RZvH8ZpQE=", "owner": "nix-community", "repo": "nixvim", - "rev": "929bb0cd1cffb9917ab14be9cdb3f27efd6f505f", + "rev": "2e30f4828d2f0c669a3f28a4a32148d02b7a92b4", "type": "github" }, "original": { @@ -652,11 +652,11 @@ ] }, "locked": { - "lastModified": 1731936508, - "narHash": "sha256-z0BSSf78LkxIrrFXZYmCoRRAxAmxMUKpK7CyxQRvkZI=", + "lastModified": 1733411491, + "narHash": "sha256-315rJ7O9cOllPDaFscnJhcMleORHbxon0Kq9LAKJ5p4=", "owner": "NuschtOS", "repo": "search", - "rev": "fe07070f811b717a4626d01fab714a87d422a9e1", + "rev": "68e9fad70d95d08156cf10a030bd39487bed8ffe", "type": "github" }, "original": { @@ -689,11 +689,11 @@ ] }, "locked": { - "lastModified": 1731551344, - "narHash": "sha256-wr8OOqgw7M1pWfe4W7WA5lErzOVMg3zvrrxx/dy/nPo=", + "lastModified": 1733625333, + "narHash": "sha256-tIML2axjm4AnlKP29upVJxzBpj4Cy4ak+PKonqQtXmc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "27570abfd3461875f11fc07c9b01c141a6332b4f", + "rev": "430c8b054e45ea44fd2c9521a378306ada507a6c", "type": "github" }, "original": { @@ -707,11 +707,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1731954233, - "narHash": "sha256-vvXx1m2Rsw7MkbKJdpcICzz4YPgZPApGKQGhNZfkhOI=", + "lastModified": 1733785344, + "narHash": "sha256-pm4cfEcPXripE36PYCl0A2Tu5ruwHEvTee+HzNk+SQE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e39947d0ee8e341fa7108bd02a33cdfa24a1360e", + "rev": "a80af8929781b5fe92ddb8ae52e9027fae780d2a", "type": "github" }, "original": { @@ -737,11 +737,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1732036949, - "narHash": "sha256-prZV8HDVvBqHiJLkjElJYoZ6zonV7cOABb8Z0lWonJA=", + "lastModified": 1733841628, + "narHash": "sha256-cSqwjZC9WOixjn33apjizc2FTSNennP9JvKw0L6Dvi8=", "owner": "danth", "repo": "stylix", - "rev": "4912f4db00bc931c7636d827e829faf01f6bf155", + "rev": "5a69e8c65787a962cb3b7ebd855942029a8cba5a", "type": "github" }, "original": { @@ -817,11 +817,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", "type": "github" }, "original": { @@ -838,11 +838,11 @@ ] }, "locked": { - "lastModified": 1731944360, - "narHash": "sha256-sJxPh+V0vUkBhlA58ok/y0o96AtfqiEF0O8qsdolI6o=", + "lastModified": 1733440889, + "narHash": "sha256-qKL3vjO+IXFQ0nTinFDqNq/sbbnnS5bMI1y0xX215fU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "579b9a2fd0020cd9cd81a4ef4eab2dca4d20c94c", + "rev": "50862ba6a8a0255b87377b9d2d4565e96f29b410", "type": "github" }, "original": { diff --git a/home/programs/gamer.nix b/home/programs/gamer.nix index 461dc40..74d0e60 100644 --- a/home/programs/gamer.nix +++ b/home/programs/gamer.nix @@ -12,15 +12,10 @@ gamescope gamemode mangohud - BeatSaberModManager + # BeatSaberModManager - out of date: https://github.com/NixOS/nixpkgs/pull/339370 protontricks protonup-qt oversteer xboxdrv - - # VR - # monado -- build is borked /: - openxr-loader - opencomposite ]; } diff --git a/home/programs/xr.nix b/home/programs/xr.nix index d86e6b3..89dd23d 100644 --- a/home/programs/xr.nix +++ b/home/programs/xr.nix @@ -1,30 +1,34 @@ { pkgs, - # config, + config, ... }: { + home.packages = with pkgs; [ + openxr-loader + opencomposite + ]; + services.monado.enable = true; + systemd.user.services.monado.environment = { + STEAMVR_LH_ENABLE = "true"; + XRT_COMPOSITOR_SCALE_PERCENTAGE = "200"; + }; home.file.".config/openxr/1/openxr_monado.json" = { source = "${pkgs.monado}/share/openxr/1/openxr_monado.json"; }; - # home.file.".config/openvr/openvrpaths.vrpath" = { - # text = '' - # { - # "config" : - # [ - # "${config.home.homeDirectory}/.local/share/Steam/config" - # ], - # "external_drivers" : null, - # "jsonid" : "vrpathreg", - # "log" : - # [ - # "${config.home.homeDirectory}/.local/share/Steam/logs" - # ], - # "runtime" : - # [ - # "${pkgs.opencomposite}/lib/opencomposite" - # ], - # "version" : 1 - # } - # ''; - # }; + home.file.".config/openvr/openvrpaths.vrpath" = { + text = builtins.toJSON { + "config" = [ + "${config.home.homeDirectory}/.local/share/Steam/config" + ]; + "external_drivers" = null; + "jsonid" = "vrpathreg"; + "log" = [ + "${config.home.homeDirectory}/.local/share/Steam/logs" + ]; + "runtime" = [ + "${pkgs.opencomposite}/lib/opencomposite" + ]; + "version" = 1; + }; + }; } diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index 245761f..3ce5de8 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -29,9 +29,4 @@ capSysNice = true; }; programs.gamemode.enable = true; - services.monado.enable = true; - systemd.user.services.monado.environment = { - STEAMVR_LH_ENABLE = "true"; - XRT_COMPOSITOR_SCALE_PERCENTAGE = "200"; - }; } diff --git a/nixos/workstation.nix b/nixos/workstation.nix index faf5e7c..72adfe8 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -65,7 +65,6 @@ ]; fonts.packages = with pkgs; [ - nerdfonts interalia ]; From 602fa20d33b779bdd3bfb89f5754ad049ab941fb Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 1 Jan 2025 15:54:30 +0000 Subject: [PATCH 64/65] zenix: fix hypridle, update rem extest --- flake.lock | 500 +++++++++++++++++++++--------- home/desktop/hyprland/default.nix | 2 +- nixos/programs/gamer.nix | 8 +- 3 files changed, 353 insertions(+), 157 deletions(-) diff --git a/flake.lock b/flake.lock index 0058626..c4745fc 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1708890466, - "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "665b3c6748534eb766c777298721cece9453fdae", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", "type": "github" }, "original": { @@ -34,30 +34,14 @@ "type": "github" } }, - "base16-foot": { - "flake": false, - "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", - "owner": "tinted-theming", - "repo": "base16-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-foot", - "type": "github" - } - }, "base16-helix": { "flake": false, "locked": { - "lastModified": 1720809814, - "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", "type": "github" }, "original": { @@ -66,46 +50,14 @@ "type": "github" } }, - "base16-kitty": { - "flake": false, - "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", - "owner": "kdrag0n", - "repo": "base16-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", - "type": "github" - }, - "original": { - "owner": "kdrag0n", - "repo": "base16-kitty", - "type": "github" - } - }, - "base16-tmux": { - "flake": false, - "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", - "owner": "tinted-theming", - "repo": "base16-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-tmux", - "type": "github" - } - }, "base16-vim": { "flake": false, "locked": { - "lastModified": 1716150083, - "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "lastModified": 1731949548, + "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", "owner": "tinted-theming", "repo": "base16-vim", - "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", "type": "github" }, "original": { @@ -122,11 +74,11 @@ ] }, "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "owner": "numtide", "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "type": "github" }, "original": { @@ -168,11 +120,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -189,11 +141,11 @@ ] }, "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -207,11 +159,32 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -223,11 +196,11 @@ "fromYaml": { "flake": false, "locked": { - "lastModified": 1689549921, - "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", "owner": "SenchoPens", "repo": "fromYaml", - "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", "type": "github" }, "original": { @@ -253,11 +226,11 @@ ] }, "locked": { - "lastModified": 1723202784, - "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", + "lastModified": 1734425854, + "narHash": "sha256-nzE5UbJ41aPEKf8R2ZFYtLkqPmF7EIUbNEdHMBLg0Ig=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "c7012d0c18567c889b948781bc74a501e92275d1", + "rev": "0ddd26d0925f618c3a5d85a4fa5eb1e23a09491d", "type": "github" }, "original": { @@ -291,32 +264,50 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1713702291, - "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", "type": "github" }, "original": { "owner": "GNOME", - "ref": "46.1", + "ref": "47.2", "repo": "gnome-shell", "type": "github" } }, + "hm-cosmic": { + "inputs": { + "home-manager": "home-manager", + "home-manager-cosmic": "home-manager-cosmic" + }, + "locked": { + "lastModified": 1733104727, + "narHash": "sha256-2a4w7OxuncH/qh+eBou65v+Ow7ZH8CobfFId3ckSQdo=", + "owner": "tristanbeedell", + "repo": "hm-cosmic", + "rev": "8c7ae2855827101eff7e52dd320599a487c78936", + "type": "github" + }, + "original": { + "owner": "tristanbeedell", + "ref": "master", + "repo": "hm-cosmic", + "type": "github" + } + }, "home-manager": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1723399884, - "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -326,7 +317,47 @@ "type": "github" } }, + "home-manager-cosmic": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1733103810, + "narHash": "sha256-S1jGheeLQJPaY80+iFu7Iv4Az3BHmVlv8PxngnK8Aog=", + "owner": "tristanbeedell", + "repo": "home-manager", + "rev": "efa4d272f6c2b14d4a3b67b0b1e4b38ae46e5588", + "type": "github" + }, + "original": { + "owner": "tristanbeedell", + "ref": "cosmic", + "repo": "home-manager", + "type": "github" + } + }, "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1734808199, + "narHash": "sha256-MxlUcLjE8xLbrI1SJ2B2jftlg4wdutEILa3fgqwA98I=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "f342df3ad938f205a913973b832f52c12546aac6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { "inputs": { "nixpkgs": [ "nixvim", @@ -334,11 +365,11 @@ ] }, "locked": { - "lastModified": 1723399884, - "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", + "lastModified": 1734622215, + "narHash": "sha256-OOfI0XhSJGHblfdNDhfnn8QnZxng63rWk9eeJ2tCbiI=", "owner": "nix-community", "repo": "home-manager", - "rev": "086f619dd991a4d355c07837448244029fc2d9ab", + "rev": "1395379a7a36e40f2a76e7b9936cc52950baa1be", "type": "github" }, "original": { @@ -347,7 +378,7 @@ "type": "github" } }, - "home-manager_3": { + "home-manager_4": { "inputs": { "nixpkgs": [ "stylix", @@ -355,11 +386,11 @@ ] }, "locked": { - "lastModified": 1715930644, - "narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -368,6 +399,52 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.6", + "repo": "ixx", + "type": "github" + } + }, + "musnix": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1734127708, + "narHash": "sha256-fXDr93nc3zUDCGS5qhrXAtwBJfiI40jIdoMncLAzbUY=", + "owner": "musnix", + "repo": "musnix", + "rev": "0a2bbd1e2ec78ef268698eb682f39015c1f3ca1d", + "type": "github" + }, + "original": { + "owner": "musnix", + "repo": "musnix", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -376,11 +453,11 @@ ] }, "locked": { - "lastModified": 1722924007, - "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "91010a5613ffd7ee23ee9263213157a1c422b705", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -392,18 +469,16 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1723599342, - "narHash": "sha256-4eUNZxze/tMkKzfAJSS+o3o4LcMH1znWfCUICO/Sw4A=", + "lastModified": 1734745015, + "narHash": "sha256-HGl0yR/qfGTO99NfiB5bqTe2nPKmD57opzB/TwhJSW0=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "5e861c29989be12691f90bda3a7b97891a629ed3", + "rev": "1c922245aec471610533c7a225bf9c20e7002ff2", "type": "github" }, "original": { @@ -414,58 +489,106 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723362943, - "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", + "lastModified": 1732837521, + "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a58bc8ad779655e790115244571758e8de055e3d", + "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "NixOS", "ref": "nixos-unstable", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1723556749, - "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", + "lastModified": 1734600368, + "narHash": "sha256-nbG9TijTMcfr+au7ZVbKpAhMJzzE2nQBYmRvSdXUD8g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a92571f9207810b559c9eac203d1f4d79830073", + "rev": "b47fd6fa00c6afca88b8ee46cfdb00e104f50bca", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1721524707, - "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", + "lastModified": 1734529975, + "narHash": "sha256-ze3IJksru9dN0keqUxY0WNf8xrwfs8Ty/z9v/keyBbg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", + "rev": "72d11d40b9878a67c38f003c240c2d2e1811e72a", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" } }, "nixpkgs_2": { "locked": { - "lastModified": 1721466660, - "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", + "lastModified": 1729256560, + "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1733392399, + "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1734424634, + "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1731763621, + "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d", "type": "github" }, "original": { @@ -475,13 +598,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_6": { "locked": { - "lastModified": 1714912032, - "narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=", + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee4a6e0f566fe5ec79968c57a9c2c3c25f2cf41d", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", "type": "github" }, "original": { @@ -497,7 +620,7 @@ "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "git-hooks": "git-hooks", - "home-manager": "home-manager_2", + "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", "nixpkgs": [ "nixpkgs" @@ -506,11 +629,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1723634417, - "narHash": "sha256-5M5fjJn02iOZN5z3zM/95l28kC0zjKCkId5JJ9J63fE=", + "lastModified": 1734798432, + "narHash": "sha256-JVU+WjrRZUJnUKQ/iXP9O8eQ0L3YkqV1DpFMS4kLZog=", "owner": "nix-community", "repo": "nixvim", - "rev": "cb398ce4ba243c7a3a8d1fbfea1b56a44de6b3c9", + "rev": "6a4b4221c4ebf1140f73f8df769e97f1828d90fa", "type": "github" }, "original": { @@ -522,17 +645,18 @@ "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils", + "ixx": "ixx", "nixpkgs": [ "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1723367906, - "narHash": "sha256-v1qA4WBGDI2uH/TVqRwuXSBP341W681psbzYJ8zrjog=", + "lastModified": 1733773348, + "narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", "owner": "NuschtOS", "repo": "search", - "rev": "6ca2c3ae05a915c160512bd41f6810f456c9b30d", + "rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", "type": "github" }, "original": { @@ -543,9 +667,15 @@ }, "root": { "inputs": { - "home-manager": "home-manager", + "hm-cosmic": "hm-cosmic", + "home-manager": "home-manager_2", + "musnix": "musnix", "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2", "nixvim": "nixvim", "sops-nix": "sops-nix", "stylix": "stylix" @@ -559,11 +689,11 @@ ] }, "locked": { - "lastModified": 1723515680, - "narHash": "sha256-nHdKymsHCVIh0Wdm4MvSgxcTTg34FJIYHRQkQYaSuvk=", + "lastModified": 1734661750, + "narHash": "sha256-BI58NBdimxu1lnpOrG9XxBz7Cwqy+qIf99zunWofX5w=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "4ee3d9e9569f70d7bb40f28804d6fe950c81eab3", + "rev": "7d3d910d5fd575e6e8c5600d83d54e5c47273bfe", "type": "github" }, "original": { @@ -574,15 +704,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1723501126, - "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", + "lastModified": 1734546875, + "narHash": "sha256-6OvJbqQ6qPpNw3CA+W8Myo5aaLhIJY/nNFDk3zMXLfM=", "owner": "Mic92", "repo": "sops-nix", - "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", + "rev": "ed091321f4dd88afc28b5b4456e0a15bd8374b4d", "type": "github" }, "original": { @@ -595,22 +724,24 @@ "inputs": { "base16": "base16", "base16-fish": "base16-fish", - "base16-foot": "base16-foot", "base16-helix": "base16-helix", - "base16-kitty": "base16-kitty", - "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_2", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_3" + "home-manager": "home-manager_4", + "nixpkgs": "nixpkgs_6", + "systems": "systems_2", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1722946882, - "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", + "lastModified": 1734531336, + "narHash": "sha256-BWwJTAiWmZudUdUbyets7e3zQfjvZYtkU51blBnUBjw=", "owner": "danth", "repo": "stylix", - "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", + "rev": "a2d66f25478103ac9b4adc6d6713794f7005221e", "type": "github" }, "original": { @@ -634,6 +765,71 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -642,11 +838,11 @@ ] }, "locked": { - "lastModified": 1723454642, - "narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=", + "lastModified": 1734704479, + "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "349de7bc435bdff37785c2466f054ed1766173be", + "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", "type": "github" }, "original": { diff --git a/home/desktop/hyprland/default.nix b/home/desktop/hyprland/default.nix index 3b7f364..df36e65 100644 --- a/home/desktop/hyprland/default.nix +++ b/home/desktop/hyprland/default.nix @@ -282,5 +282,5 @@ in { systemd.target = "hyprland-session.target"; }; - systemd.user.services.hypridle.Install.WantedBy = ["hyprland-session.target"]; + systemd.user.services.hypridle.Install.WantedBy = lib.mkForce ["hyprland-session.target"]; } diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index 3ce5de8..ccd0a62 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -13,10 +13,10 @@ ]; programs.steam = { enable = true; - extest.enable = true; - extraCompatPackages = with pkgs; [ - proton-ge-bin - ]; + # extest.enable = true; + # extraCompatPackages = with pkgs; [ + # proton-ge-bin + # ]; remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; gamescopeSession = { From 297c24145830df18b6de4c259b3e41baf71d1cea Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 7 Jan 2025 13:36:36 +0000 Subject: [PATCH 65/65] zenix: musenix ardour setup --- home/programs/personal/default.nix | 2 -- nixos/programs/gamer.nix | 4 ---- nixos/services/musnix.nix | 23 +++++++++++++++++++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/home/programs/personal/default.nix b/home/programs/personal/default.nix index 703a94b..e1ec3a1 100644 --- a/home/programs/personal/default.nix +++ b/home/programs/personal/default.nix @@ -32,9 +32,7 @@ home.packages = with pkgs; [ godot_4 - ardour blender - musescore monero-gui transmission-remote-gtk krita diff --git a/nixos/programs/gamer.nix b/nixos/programs/gamer.nix index ccd0a62..96e3a16 100644 --- a/nixos/programs/gamer.nix +++ b/nixos/programs/gamer.nix @@ -13,10 +13,6 @@ ]; programs.steam = { enable = true; - # extest.enable = true; - # extraCompatPackages = with pkgs; [ - # proton-ge-bin - # ]; remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; gamescopeSession = { diff --git a/nixos/services/musnix.nix b/nixos/services/musnix.nix index ce62cd6..9bbd89d 100644 --- a/nixos/services/musnix.nix +++ b/nixos/services/musnix.nix @@ -1,5 +1,24 @@ -{ inputs, user, ... }: { +{ inputs, user, pkgs, lib, ... }: { imports = [inputs.musnix.nixosModules.musnix]; users.users.${user}.extraGroups = ["audio"]; - musnix.enable = true; + musnix = { + enable = true; + rtcqs.enable = true; + kernel.realtime = true; + }; + environment.systemPackages = with pkgs; [ + ardour + musescore + muse + helm + calf + qjackctl + sfizz + tap-plugins + x42-plugins + x42-gmsynth + carla + drumgizmo + distrho-ports + ]; }