From d8f8e62dfb4fc6863c76b247e5d61be14d84cc4e Mon Sep 17 00:00:00 2001 From: emily Date: Tue, 27 Feb 2024 19:07:12 +0100 Subject: [PATCH] fixes --- README.md | 7 +++- config/common/default.nix | 5 +-- config/common/users/emily/default.nix | 2 + config/hosts/base/configuration.nix | 55 +++++++++++++++++++++++++- config/hosts/ryuuko/disko.nix | 4 +- config/hosts/web-dus/configuration.nix | 1 + config/profiles/graphical/default.nix | 12 +++++- flake.lock | 24 +++++------ 8 files changed, 89 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 381cbb6..b877f5c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # emilys Nix Infra +## First deployment + +```console +$ nix run github:nix-community/nixos-anywhere -- --flake ".#" root@ +``` + ## Deploy changes on ... ### all hosts @@ -13,7 +19,6 @@ $ colmena apply --on @production ```console $ colmena apply --on @router ``` - ## Structure ``` nixfiles diff --git a/config/common/default.nix b/config/common/default.nix index b20e200..9935a19 100644 --- a/config/common/default.nix +++ b/config/common/default.nix @@ -59,7 +59,6 @@ with lib; { nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.trusted-users = [ "root" "@wheel" ]; - nixpkgs.hostPlatform.system = "x86_64-linux"; nixpkgs.config.allowUnfree = true; boot.tmp.cleanOnBoot = mkDefault true; @@ -80,9 +79,9 @@ with lib; { echo 'en_EU.UTF-8/UTF-8 \' >>localedata/SUPPORTED ''; })); - services.xserver = { + services.xserver.xkb = { layout = "de"; - xkbVariant = "neo_qwerty"; + variant = "neo_qwerty"; }; console.useXkbConfig = true; console.earlySetup = true; diff --git a/config/common/users/emily/default.nix b/config/common/users/emily/default.nix index 7c579cc..78ed5b3 100644 --- a/config/common/users/emily/default.nix +++ b/config/common/users/emily/default.nix @@ -5,6 +5,7 @@ users.users.emily = { isNormalUser = true; shell = pkgs.fish; + ignoreShellProgramCheck = true; extraGroups = [ "wheel" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card" @@ -20,6 +21,7 @@ home.packages = with pkgs; [ whois + htop restic ] ++ lib.optionals config.kyouma.machine-type.graphical [ thunderbird diff --git a/config/hosts/base/configuration.nix b/config/hosts/base/configuration.nix index 48a3b29..238015b 100644 --- a/config/hosts/base/configuration.nix +++ b/config/hosts/base/configuration.nix @@ -1,8 +1,8 @@ -{ modulesPath, config, lib, pkgs, ... }: { +{ modulesPath, config, lib, inputs, pkgs, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") - ./config/common/users + inputs.home-manager.nixosModules.home-manager ]; boot.loader = { @@ -17,9 +17,60 @@ pkgs.gitMinimal ]; + services.xserver.xkb = { + layout = "de"; + variant = "neo_qwerty"; + }; + console.useXkbConfig = true; + console.earlySetup = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.trusted-users = [ "root" "@wheel" ]; + security.sudo.wheelNeedsPassword = false; + users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card" ]; + users.users.emily = { + isNormalUser = true; + shell = pkgs.fish; + ignoreShellProgramCheck = true; + extraGroups = [ "wheel" ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card" + ]; + }; + + home-manager.useGlobalPkgs = true; + home-manager.users.emily = { + home.stateVersion = "23.11"; + + fonts.fontconfig.enable = true; + + programs.gpg.enable = true; + programs.ripgrep.enable = true; + + programs.eza = { + enable = true; + enableAliases = true; + icons = true; + git = true; + extraOptions = [ + "--color-scale=all" + "--color-scale-mode=gradient" + "--group-directories-first" + ]; + }; + programs.fish = { + enable = true; + interactiveShellInit = '' + set -U fish_greeting + ''; + loginShellInit = '' + [ (tty) = /dev/tty1 ] ;and exec Hyprland + ''; + }; + }; system.stateVersion = "23.11"; } diff --git a/config/hosts/ryuuko/disko.nix b/config/hosts/ryuuko/disko.nix index e2ea5ee..9ef8dc0 100644 --- a/config/hosts/ryuuko/disko.nix +++ b/config/hosts/ryuuko/disko.nix @@ -3,7 +3,7 @@ inputs.disko.nixosModules.disko ]; disko.devices.disk.nvme = { - device = "/dev/vda"; + device = "/dev/sda"; type = "disk"; content = { type = "gpt"; @@ -15,7 +15,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "defaults" ]; + mountOptions = [ "umask=0077" "defaults" ]; }; }; crypt = { diff --git a/config/hosts/web-dus/configuration.nix b/config/hosts/web-dus/configuration.nix index 11684d8..1b35af0 100644 --- a/config/hosts/web-dus/configuration.nix +++ b/config/hosts/web-dus/configuration.nix @@ -30,6 +30,7 @@ in { "2a0f:be01:0:100::1312/128" ]; }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; services.vyosBld = { enable = true; output = "/var/www/kyouma.net/vyos"; diff --git a/config/profiles/graphical/default.nix b/config/profiles/graphical/default.nix index 0341c89..12c244b 100644 --- a/config/profiles/graphical/default.nix +++ b/config/profiles/graphical/default.nix @@ -24,7 +24,6 @@ GDK_BACKEND = "wayland,x11"; MOZ_ENABLE_WAYLAND = "1"; CLUTTER_BACKEND = "wayland"; - WLR_NO_HARDWARE_CURSORS = "1"; }; xdg.portal.wlr.enable = true; @@ -93,6 +92,14 @@ fi ''; }; + home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = { + enable = true; + source = config.stylix.image; + }; + home.file."Pictures/wallpapers/lockscreen.png" = { + enable = true; + source = config.stylix.image; + }; home.file.".local/bin/hypr" = { enable = true; executable = true; @@ -384,6 +391,9 @@ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ]; + exec-once = [ + "${pkgs.wpaperd}/bin/wpaperd" + ]; }; }; diff --git a/flake.lock b/flake.lock index 1449d7e..832e09e 100644 --- a/flake.lock +++ b/flake.lock @@ -386,11 +386,11 @@ ] }, "locked": { - "lastModified": 1708806879, - "narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=", + "lastModified": 1708988456, + "narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=", "owner": "nix-community", "repo": "home-manager", - "rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a", + "rev": "1d085ea4444d26aa52297758b333b449b2aa6fca", "type": "github" }, "original": { @@ -407,11 +407,11 @@ ] }, "locked": { - "lastModified": 1708558280, - "narHash": "sha256-w1ns8evB6N9VTrAojcdXLWenROtd77g3vyClrqeFdG8=", + "lastModified": 1708806879, + "narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=", "owner": "nix-community", "repo": "home-manager", - "rev": "0b69d574162cfa6eb7919d5614a48d0185550891", + "rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a", "type": "github" }, "original": { @@ -468,11 +468,11 @@ ] }, "locked": { - "lastModified": 1708231718, - "narHash": "sha256-IZdieFWvhBkxoOFMDejqLUYqD94WN6k0YSpw0DFy+4g=", + "lastModified": 1708737761, + "narHash": "sha256-sR/1cYjpgr71ZSrt6Kp5Dg4Ul3mo6pZIG400tuzYks8=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "0e6857fa1d632637488666c08e7b02c08e3178f8", + "rev": "bbde06bed1b72eddff063fa42f18644e90a0121e", "type": "github" }, "original": { @@ -588,11 +588,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1708614940, - "narHash": "sha256-36muWApzetaV4WAEeqKsWxW4k2l0u3E841RI4sHPiz0=", + "lastModified": 1709038245, + "narHash": "sha256-pXi4kgnGTjwyFWENr/er4nEfzEoBFMkyeXC4d4a5Y3k=", "owner": "nix-community", "repo": "nixvim", - "rev": "060a05138ca1a46fc0a0f79ef27f080cac57a59e", + "rev": "8b013707cc1be375ae06fadd0ccb9eb1df277a10", "type": "github" }, "original": {