diff --git a/config/common/users/emily/default.nix b/config/common/users/emily/default.nix index cf9b3c1..7c579cc 100644 --- a/config/common/users/emily/default.nix +++ b/config/common/users/emily/default.nix @@ -37,6 +37,8 @@ libnotify slurp grim + gnome.simple-scan + gnome.nautilus imagemagick_light #ubuntu_font_family @@ -66,8 +68,8 @@ interactiveShellInit = '' set -U fish_greeting ''; - loginShellInit = lib.mkIf config.kyouma.machine-type.graphical '' - [[ $TTY = '/dev/tty1' ]] && exec Hyprland + loginShellInit = '' + [ (tty) = /dev/tty1 ] ;and exec Hyprland ''; }; programs.git = { diff --git a/config/hosts/ryuuko/configuration.nix b/config/hosts/ryuuko/configuration.nix index b36f579..123f8da 100644 --- a/config/hosts/ryuuko/configuration.nix +++ b/config/hosts/ryuuko/configuration.nix @@ -1,23 +1,74 @@ -{ config, lib, ... }: { +{ config, inputs, lib, pkgs, ... }: { imports = [ + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4 ../../common ../../profiles/graphical ./hardware-configuration.nix ]; + + boot.extraModprobeConfig = '' + options i915 enable_guc=3 + ''; + boot.initrd.kernelModules = [ "i915" ]; + boot.kernelParams = [ + "intel_iommu=on" + "i915.enable_guc=3" + "nohz=on" + "irqaffinity=9-15" + "nohz_full=1-14" + "rcu_nocbs=0-8" + + ]; boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; + deployment = { targetHost = "192.168.122.159"; targetUser = "emily"; }; - users.mutableUsers = lib.mkForce true; - i18n.defaultLocale = "en_GB.UTF-8"; - networking.hostName = "ryuuko"; - networking.networkmanager.enable = true; - systemd.network.enable = lib.mkForce false; + + hardware.bluetooth.enable = true; + hardware.cpu.intel.updateMicrocode = true; + hardware.gpgSmartcards.enable = true; + hardware.nitrokey.enable = true; + + hardware.opengl = { + driSupport32Bit = true; + extraPackages = [ pkgs.intel-media-driver pkgs.libvdpau-va-gl ]; + }; + hardware.sane = { + enable = true; + extraBackends = [ pkgs.utsushi ]; + }; + kyouma.machine-type.physical = true; kyouma.machine-type.portable = true; + + networking.hostName = "ryuuko"; + networking.firewall.allowedTCPPorts = [ 22000 ]; + networking.firewall.allowedUDPPorts = [ 22000 ]; + networking.networkmanager.enable = true; + systemd.network.enable = lib.mkForce false; + + services.avahi = { + enable = true; + ipv6 = true; + nssmdns4 = true; + publish.enable = true; + publish.userServices = true; + }; + services.fprintd.enable = true; + services.fstrim.enable = true; services.openssh.enable = true; + services.pcscd.enable = true; + services.printing = { + enable = true; + drivers = [ pkgs.hplip pkgs.brlaser ]; + }; + services.usbmuxd.enable = true; + + users.mutableUsers = lib.mkForce true; + users.users.emily.extraGroups = [ "nitrokey" "scanner" "video" ]; } diff --git a/config/hosts/ryuuko/disko.nix b/config/hosts/ryuuko/disko.nix new file mode 100644 index 0000000..160ba73 --- /dev/null +++ b/config/hosts/ryuuko/disko.nix @@ -0,0 +1,51 @@ +{ config, inputs, ... }: { + imports = [ + inputs.disko.nixosModules.disko + ]; + disko.devices.disk.nvme = { + device = "/dev/vda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + BOOT = { + type = "EF00"; + size = "512M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "defaults" ]; + }; + }; + crypt = { + size = "100%"; + content = { + name = "nixos"; + type = "luks"; + settings.allowDiscards = true; + settings.keyFile = "/tmp/disk.key"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "nixos" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/config/hosts/ryuuko/hardware-configuration.nix b/config/hosts/ryuuko/hardware-configuration.nix index 286f7fa..94ada37 100644 --- a/config/hosts/ryuuko/hardware-configuration.nix +++ b/config/hosts/ryuuko/hardware-configuration.nix @@ -33,7 +33,6 @@ # (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.enp1s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/config/profiles/graphical/default.nix b/config/profiles/graphical/default.nix index d36859f..0341c89 100644 --- a/config/profiles/graphical/default.nix +++ b/config/profiles/graphical/default.nix @@ -243,7 +243,7 @@ "animation slide up,Rofi" ]; - "$mod" = "ALT"; + "$mod" = "SUPER"; "$notifycmd" = "${notifysend} -h string:x-canonical-private-synchronous:hypr-cfg -u low"; bind = [ "$mod, Return, exec, ${kitty}" diff --git a/flake.nix b/flake.nix index 0a18b27..b49795d 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,10 @@ kyouma-www.url = "git+ssh://git@git.bsd.gay/snaki/kyouma-net.git"; secrix.url = "github:Platonic-Systems/secrix"; stylix.url = "github:danth/stylix"; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -34,6 +38,16 @@ imports = [ ./config/hosts/ryuuko/configuration.nix ]; }; }; + nixosConfiguration = { + ryuuko = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./config/hosts/ryuuko/configuration.nix + ./config/hosts/ryuuko/disko.nix + ]; + }; + }; apps.x86_64-linux.secrix = inputs.secrix.secrix self; devShells.x86_64-linux.default = let pkgs = nixpkgs.legacyPackages.x86_64-linux;