From 07020f01c393bc43d5fc0ab97b909998a5172ab2 Mon Sep 17 00:00:00 2001 From: Vivian Date: Mon, 19 Aug 2024 18:21:56 +0200 Subject: [PATCH] updates --- common/desktop/home.nix | 1 - common/modules/meta.nix | 20 +-- common/users/laura.nix | 6 +- common/users/vivian.nix | 2 +- flake.lock | 128 +++++++++--------- flake.nix | 13 ++ hosts/olympus/bastion/containers/default.nix | 5 - hosts/olympus/bastion/default.nix | 3 +- hosts/olympus/bastion/immich.nix | 78 +++++++++++ hosts/olympus/eevee/default.nix | 53 ++++++++ .../olympus/eevee/hardware-configuration.nix | 42 ++++++ hosts/olympus/eevee/hardware.nix | 43 ++++++ hosts/olympus/eevee/home/.gitignore | 1 + hosts/olympus/eevee/home/default.nix | 9 ++ pkgs/hyprland-workspaces/default.nix | 3 +- 15 files changed, 321 insertions(+), 86 deletions(-) create mode 100644 hosts/olympus/bastion/immich.nix create mode 100644 hosts/olympus/eevee/default.nix create mode 100644 hosts/olympus/eevee/hardware-configuration.nix create mode 100644 hosts/olympus/eevee/hardware.nix create mode 100644 hosts/olympus/eevee/home/.gitignore create mode 100644 hosts/olympus/eevee/home/default.nix diff --git a/common/desktop/home.nix b/common/desktop/home.nix index 89832ef7..d5289d34 100644 --- a/common/desktop/home.nix +++ b/common/desktop/home.nix @@ -31,7 +31,6 @@ in btop calibre celluloid # video player - cinny-desktop element-desktop fusee-launcher foliate # epub reader diff --git a/common/modules/meta.nix b/common/modules/meta.nix index 7b1a372e..847c2e28 100644 --- a/common/modules/meta.nix +++ b/common/modules/meta.nix @@ -74,16 +74,16 @@ in { # TODO: Open Firewall assertions = [ - { - assertion = config.meta.mac != null; - message = - "${config.networking.fqdnOrHostName} is missing a mac address"; - } - { - assertion = !config.meta.isLaptop -> config.meta.ipv4 != null; - message = - "${config.networking.fqdnOrHostName} needs ipv4 address set as it is not a laptop"; - } + # { + # assertion = config.meta.mac != null; + # message = + # "${config.networking.fqdnOrHostName} is missing a mac address"; + # } + # { + # assertion = !config.meta.isLaptop -> config.meta.ipv4 != null; + # message = + # "${config.networking.fqdnOrHostName} needs ipv4 address set as it is not a laptop"; + # } ]; }; } diff --git a/common/users/laura.nix b/common/users/laura.nix index 6c19947c..05226303 100644 --- a/common/users/laura.nix +++ b/common/users/laura.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ users.extraUsers.laura = { isNormalUser = true; shell = pkgs.zsh; @@ -6,9 +7,10 @@ openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBIlFUUXbwOkhNUjoA6zueTdRuaylgpgFqSe/xWGK9zb laura@zmeura" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVkk9/80askWhInQk03JMntF6SThAYkFZNm+lIGt4E7 laura@mura" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFxoq/J/0ad3AOK/CxPvsIGQjRUzURSuNAtmNOqUmKcr laura@cherry" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGMKbP2/vNTybDoEwdFaQvAI1zCVpdTBN25avfeCV0jP laura@bosbes" ]; extraGroups = [ ]; }; } - diff --git a/common/users/vivian.nix b/common/users/vivian.nix index 862ff070..106bfbc0 100644 --- a/common/users/vivian.nix +++ b/common/users/vivian.nix @@ -12,9 +12,9 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBhJAp7NWlHgwDYd2z6VNROy5RkeZHRINFLsFvwT4b3 vivian@bastion" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMMbdjysLnmwJD5Fs/SjBPstdIQNUxy8zFHP0GlhHMJB vivian@bastion" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIfooZjMWXvXZu1ReOEACDZ0TMb2WJRBSOLlWE8y6fUh vivian@aoife" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBMTCUjDbDjAiEKbKmLPavuYM0wJIBdjgytLsg1uWuGc vivian@nord" "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIM3TqXaApX2JZsgfZd7PKVFMecDgqTHKibpSzgdXNpYAAAAABHNzaDo= solov2-le" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID+HbsgJTQS6pvnMEI5NPKjIf78z+9A7CTIt3abi+PS6 vivian@eevee" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMypFe7cSMgvEI1sdxRtdC+AalXa0ryB/zkO9KmQGOxK vivian@nothing2" ]; # Make me admin diff --git a/flake.lock b/flake.lock index a45e2f94..63e02d2c 100644 --- a/flake.lock +++ b/flake.lock @@ -11,11 +11,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1722472866, - "narHash": "sha256-GJIz4M5HDB948Ex/8cPvbkrNzl/eKUE7/c21JBu4lb8=", + "lastModified": 1723558887, + "narHash": "sha256-FBaRmikNnCX+HQJXAfNJyiOl3sM1NrlxvcFwQDqwCyk=", "owner": "zhaofengli", "repo": "attic", - "rev": "e127acbf9a71ebc0c26bc8e28346822e0a6e16ba", + "rev": "26b9417bde03edc6280d1f7ce709cd619cdb72d4", "type": "github" }, "original": { @@ -42,11 +42,11 @@ }, "catppuccin": { "locked": { - "lastModified": 1721784420, - "narHash": "sha256-bgF6fN4Qgk7NErFKGuuqWXcLORsiykTYyqMUFRiAUBY=", + "lastModified": 1723691425, + "narHash": "sha256-F25VvHFMaqr26b7goaVWspXaK6XTRFz8RnILV+9OPkk=", "owner": "catppuccin", "repo": "nix", - "rev": "8bdb55cc1c13f572b6e4307a3c0d64f1ae286a4f", + "rev": "552056779a136092eb6358c573d925630172fc30", "type": "github" }, "original": { @@ -189,11 +189,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1720420198, - "narHash": "sha256-OIuDb6pHDyGpo7YMFyuRzMLcHm7mRvlYOz0Ht7ps2sU=", + "lastModified": 1722580276, + "narHash": "sha256-VaNcSh7n8OaFW/DJsR6Fm23V+EGpSei0DyF71RKB+90=", "owner": "nix-community", "repo": "fenix", - "rev": "abc0549e3560189462a7d394cc9d50af4608d103", + "rev": "286f371b3cfeaa5c856c8e6dfb893018e86cc947", "type": "github" }, "original": { @@ -341,11 +341,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": { @@ -545,11 +545,11 @@ ] }, "locked": { - "lastModified": 1721042469, - "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", + "lastModified": 1723202784, + "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", + "rev": "c7012d0c18567c889b948781bc74a501e92275d1", "type": "github" }, "original": { @@ -630,11 +630,11 @@ ] }, "locked": { - "lastModified": 1722462338, - "narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=", + "lastModified": 1723986931, + "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e090576c4824b16e8759ebca3958c5b09659ee8", + "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", "type": "github" }, "original": { @@ -651,11 +651,11 @@ ] }, "locked": { - "lastModified": 1722407237, - "narHash": "sha256-wcpVHUc2nBSSgOM7UJSpcRbyus4duREF31xlzHV5T+A=", + "lastModified": 1723399884, + "narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=", "owner": "nix-community", "repo": "home-manager", - "rev": "58cef3796271aaeabaed98884d4abaab5d9d162d", + "rev": "086f619dd991a4d355c07837448244029fc2d9ab", "type": "github" }, "original": { @@ -699,11 +699,11 @@ "nixpkgs-24_05": "nixpkgs-24_05" }, "locked": { - "lastModified": 1721121314, - "narHash": "sha256-zwc7YXga/1ppaZMWFreZykXtFwBgXodxUZiUx969r+g=", + "lastModified": 1722877200, + "narHash": "sha256-qgKDNJXs+od+1UbRy62uk7dYal3h98I4WojfIqMoGcg=", "ref": "refs/heads/master", - "rev": "059b50b2e729729ea00c6831124d3837c494f3d5", - "revCount": 592, + "rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2", + "revCount": 593, "type": "git", "url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git" }, @@ -720,11 +720,11 @@ "spectrum": "spectrum" }, "locked": { - "lastModified": 1721849618, - "narHash": "sha256-+cKh/zzyzOfOC7GryAVMESpvTckOVJ+cQC01JJi1z8k=", + "lastModified": 1723470968, + "narHash": "sha256-W76xLG4thxkENM3MOoXWYqKPrgk1WgUWzTixUyuw/co=", "owner": "astro", "repo": "microvm.nix", - "rev": "2f56d58cae49d6b66adc42aa3c52051a83f6a176", + "rev": "69e8ac63a7a4d40bb65e73af41ba60df2eba0419", "type": "github" }, "original": { @@ -741,11 +741,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": { @@ -756,11 +756,11 @@ }, "nixlib": { "locked": { - "lastModified": 1722128034, - "narHash": "sha256-L8rwzYPsLo/TYtydPJoQyYOfetuiyQYnTWYcyB8UE/s=", + "lastModified": 1723337705, + "narHash": "sha256-znSU0DeNDPt7+LMAfFkvKloMaeQ6yl/U5SqV/ktl1vA=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "d15f6f6021693898fcd2c6a9bb13707383da9bbc", + "rev": "ace7856d327b618d3777e31b1f224b3ab57ed71a", "type": "github" }, "original": { @@ -777,11 +777,11 @@ ] }, "locked": { - "lastModified": 1722214420, - "narHash": "sha256-qfHC1p5hcErGcE672/KhBkyWYloekQpqIxtcbcUVYkA=", + "lastModified": 1723870831, + "narHash": "sha256-rXQKvogLHY3BxRVVt5unpbi0zpRf965f57gplWSzQ5k=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "75cbb2a5e19c18840d105a72d036c6c92fc46c5d", + "rev": "32e9d82bada67fc5155e8d4d99b6fc3a1765bfdc", "type": "github" }, "original": { @@ -792,11 +792,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1722332872, - "narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=", + "lastModified": 1723310128, + "narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "14c333162ba53c02853add87a0000cbd7aa230c2", + "rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf", "type": "github" }, "original": { @@ -886,11 +886,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1720418205, - "narHash": "sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU=", + "lastModified": 1722421184, + "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "655a58a72a6601292512670343087c2d75d859c1", + "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", "type": "github" }, "original": { @@ -902,11 +902,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1722452851, - "narHash": "sha256-SdkmXWvYOIxgDksO5hobBwAZdc/pj7Okx0MferKgG9o=", + "lastModified": 1723957280, + "narHash": "sha256-J08Yqf2IJ73y7myI69qEKsQ048ibweG6FeJeCxbIdB4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c68bae316281af1b80a1d12c6f56d2b92b6f2d3a", + "rev": "abcef4da4ebb72240bddc370a27263627e64877f", "type": "github" }, "original": { @@ -917,11 +917,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1722185531, - "narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=", + "lastModified": 1723175592, + "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d", + "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", "type": "github" }, "original": { @@ -960,11 +960,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1722458167, - "narHash": "sha256-ri87zBCPf5EaMOvpjU+tx+LgIgVE7HeudjLfVAYSiqs=", + "lastModified": 1723923888, + "narHash": "sha256-w+/PG6KqB8en0x1JH5aMuf0QC78Nfei208EaaaRuYG4=", "owner": "pta2002", "repo": "nixvim", - "rev": "8024b044d612a0aa354eafa6d111ddac56f097bd", + "rev": "78fc4be6a830e8dc01f3e66ddbe3243b4bfe8560", "type": "github" }, "original": { @@ -975,11 +975,11 @@ }, "nur": { "locked": { - "lastModified": 1722494317, - "narHash": "sha256-TPS7h6uaIKxXYVjep3DJdVMNlo++tMdtljjdDwDcr7E=", + "lastModified": 1723992327, + "narHash": "sha256-w0DhauBqGC7zBlsm0i0IXVvhBGqBvsJPGnc5b9jffvA=", "owner": "nix-community", "repo": "NUR", - "rev": "85c4a46c0ac51dc69cb44c0950f9ee0f2b9b1c8d", + "rev": "adee26fc0c486560152c814b963ae27851eef658", "type": "github" }, "original": { @@ -997,11 +997,11 @@ ] }, "locked": { - "lastModified": 1722144272, - "narHash": "sha256-olZbfaEdd+zNPuuyYcYGaRzymA9rOmth8yXOlVm+LUs=", + "lastModified": 1723367906, + "narHash": "sha256-v1qA4WBGDI2uH/TVqRwuXSBP341W681psbzYJ8zrjog=", "owner": "NuschtOS", "repo": "search", - "rev": "16565307c267ec219c2b5d3494ba66df08e7d403", + "rev": "6ca2c3ae05a915c160512bd41f6810f456c9b30d", "type": "github" }, "original": { @@ -1063,11 +1063,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1720344064, - "narHash": "sha256-STmaV9Zu74QtkGGrbr9uMhskwagfCjJqOAYapXabiuk=", + "lastModified": 1722521768, + "narHash": "sha256-FvJ4FaMy1kJbZ3Iw1RyvuiUAsbHJXoU2HwylzaFzj1o=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "a5b21ea0aa644dffd7cf958b43f11f221d53404e", + "rev": "f149dc5029d8406fae8b2c541603bcac06e30deb", "type": "github" }, "original": { @@ -1279,11 +1279,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 38a44e08..5bab0ea6 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,13 @@ ./hosts/thalassa/aoife ]; }; + + eevee = { + modules = [ + ./common/desktop + ./hosts/olympus/eevee + ]; + }; }; # deploy-rs @@ -140,6 +147,12 @@ hostname = "aoife"; profiles.system.path = deploy.lib.x86_64-linux.activate.nixos self.nixosConfigurations.aoife; }; + + eevee = { + fastConnection = true; + hostname = "eevee.olympus"; + profiles.system.path = deploy.lib.x86_64-linux.activate.nixos self.nixosConfigurations.eevee; + }; }; }; diff --git a/hosts/olympus/bastion/containers/default.nix b/hosts/olympus/bastion/containers/default.nix index 1d1cf4ae..b88348a0 100644 --- a/hosts/olympus/bastion/containers/default.nix +++ b/hosts/olympus/bastion/containers/default.nix @@ -37,11 +37,6 @@ in { inputs.catppuccin.nixosModules.catppuccin ]; - services.v.dns = { - enable = true; - openFirewall = true; - mode = "server"; - }; }; }; }; diff --git a/hosts/olympus/bastion/default.nix b/hosts/olympus/bastion/default.nix index e6fe5de8..c5386982 100644 --- a/hosts/olympus/bastion/default.nix +++ b/hosts/olympus/bastion/default.nix @@ -7,6 +7,7 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ./containers + ./immich.nix # ./vms.nix ]; @@ -30,7 +31,7 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? - virtualisation.podman.enable = true; + virtualisation.docker.enable = true; # Additional packages environment.systemPackages = with pkgs; [ vault ]; diff --git a/hosts/olympus/bastion/immich.nix b/hosts/olympus/bastion/immich.nix new file mode 100644 index 00000000..46e21e79 --- /dev/null +++ b/hosts/olympus/bastion/immich.nix @@ -0,0 +1,78 @@ +{ config, pkgs, ... }: +{ + boot.kernel.sysctl = { "vm.overcommit_memory" = 1; }; + + virtualisation.oci-containers.backend = "docker"; + virtualisation.docker.autoPrune.enable = true; + + + systemd.services.init-filerun-network-and-files = { + description = "Create the network bridge for Immich."; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + serviceConfig.Type = "oneshot"; + script = + let + dockercli = "${config.virtualisation.docker.package}/bin/docker"; + in + '' + # immich-net network + check=$(${dockercli} network ls | grep "immich-net" || true) + if [ -z "$check" ]; then + ${dockercli} network create immich-net + else + echo "immich-net already exists in docker" + fi + ''; + }; + + virtualisation.oci-containers.containers = { + immich = { + autoStart = true; + image = "ghcr.io/imagegenius/immich:latest"; + volumes = [ + "/mnt/backup/immich/config:/config" + "/mnt/backup/immich/photos:/photos" + "/mnt/backup/replicated/photos:/replicated" + "/mnt/backup/immich/config/machine-learning:/config/machine-learning" + ]; + ports = [ "2283:8080" ]; + environment = { + PUID = "1000"; + PGID = "1000"; + TZ = "Europe/Amsterdam"; # Change this to your timezone + DB_HOSTNAME = "postgres14"; + DB_USERNAME = "postgres"; + DB_PASSWORD = "postgres"; + DB_DATABASE_NAME = "immich"; + REDIS_HOSTNAME = "redis"; + }; + extraOptions = [ + "--network=immich-net" + "--pull=always" + # "--gpus=all" + ]; + }; + + redis = { + autoStart = true; + image = "redis"; + ports = [ "6379:6379" ]; + extraOptions = [ "--network=immich-net" ]; + }; + + postgres14 = { + autoStart = true; + image = "tensorchord/pgvecto-rs:pg14-v0.2.0"; + ports = [ "5432:5432" ]; + volumes = [ "pgdata:/var/lib/postgresql/data" ]; + environment = { + POSTGRES_USER = "postgres"; + POSTGRES_PASSWORD = "postgres"; + POSTGRES_DB = "immich"; + }; + extraOptions = [ "--network=immich-net" ]; + }; + }; +} diff --git a/hosts/olympus/eevee/default.nix b/hosts/olympus/eevee/default.nix new file mode 100644 index 00000000..6e4e1710 --- /dev/null +++ b/hosts/olympus/eevee/default.nix @@ -0,0 +1,53 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ pkgs, ... }: { + imports = [ ./hardware-configuration.nix ./hardware.nix ]; + + # Bootloader. + boot = { + kernelPackages = pkgs.linuxPackages_latest; + initrd = { + kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; + }; + loader.systemd-boot.configurationLimit = 5; + }; + + fileSystems."/".options = [ "compress=zstd" ]; + + # Set your time zone. + time.timeZone = "Europe/Amsterdam"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "nl_NL.UTF-8"; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + environment.systemPackages = with pkgs; [ wireguard-tools ]; + + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + home-manager = { + users.vivian = import ./home; + }; + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.05"; # Did you read the comment? +} diff --git a/hosts/olympus/eevee/hardware-configuration.nix b/hosts/olympus/eevee/hardware-configuration.nix new file mode 100644 index 00000000..efc77070 --- /dev/null +++ b/hosts/olympus/eevee/hardware-configuration.nix @@ -0,0 +1,42 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + boot = { + + initrd.availableKernelModules = + [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/947a98af-9a4e-4811-a2ca-9aa00b319e9c"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/D883-F146"; + fsType = "vfat"; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/a99402e1-6f2a-4c4b-b69f-aae2fd13ffc0"; }]; + + # 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 + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/olympus/eevee/hardware.nix b/hosts/olympus/eevee/hardware.nix new file mode 100644 index 00000000..1595ddfb --- /dev/null +++ b/hosts/olympus/eevee/hardware.nix @@ -0,0 +1,43 @@ +{ pkgs, ... }: +{ + hardware = { + enableAllFirmware = true; + nvidia = { + # package = config.boot.kernelPackages.nvidiaPackages.stable; + + # Open drivers cause gdm to crash + # open = true; + + # nvidia-drm.modeset=1 + modesetting.enable = true; + powerManagement.enable = false; + }; + + # Hardware acceleration + graphics.enable = true; + + logitech.wireless = { + enable = true; + enableGraphical = true; + }; + }; + services = { + + hardware.bolt.enable = true; + + xserver.videoDrivers = [ "nvidia" ]; + + # udev + udev.packages = with pkgs; [ + android-udev-rules + logitech-udev-rules + wooting-udev-rules + ]; + + # SSD Trim + fstrim.enable = true; + }; + + # FS + fileSystems."/".options = [ "compress=zstd" ]; +} diff --git a/hosts/olympus/eevee/home/.gitignore b/hosts/olympus/eevee/home/.gitignore new file mode 100644 index 00000000..3e0fc8e7 --- /dev/null +++ b/hosts/olympus/eevee/home/.gitignore @@ -0,0 +1 @@ +*dconf_dump* \ No newline at end of file diff --git a/hosts/olympus/eevee/home/default.nix b/hosts/olympus/eevee/home/default.nix new file mode 100644 index 00000000..bf2d078a --- /dev/null +++ b/hosts/olympus/eevee/home/default.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + dconf.settings."org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + + home.packages = with pkgs; [ + zoom-us + ]; +} diff --git a/pkgs/hyprland-workspaces/default.nix b/pkgs/hyprland-workspaces/default.nix index 1b115390..af9f9136 100644 --- a/pkgs/hyprland-workspaces/default.nix +++ b/pkgs/hyprland-workspaces/default.nix @@ -10,8 +10,7 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-4QGLTimIpx74gWUyHCheUZZT1WgVzBoJRY8OlUDdOh4="; }; - # cargoSha256 = "sha256-9ndP0nyRBCdOGth4UWA263IvjbgnVW2x9PK8oTaMrxg="; - cargoHash = null; + cargoHash = "sha256-9ndP0nyRBCdOGth4UWA263IvjbgnVW2x9PK8oTaMrxg="; meta = with lib; { description = "A multi-monitor aware Hyprland workspace widget";