This commit is contained in:
emily 2024-02-26 20:06:58 +01:00
parent 5f86afd4fa
commit 0a020f4167
Signed by: emily
GPG key ID: F6F4C66207FCF995
6 changed files with 127 additions and 10 deletions

View file

@ -37,6 +37,8 @@
libnotify libnotify
slurp slurp
grim grim
gnome.simple-scan
gnome.nautilus
imagemagick_light imagemagick_light
#ubuntu_font_family #ubuntu_font_family
@ -66,8 +68,8 @@
interactiveShellInit = '' interactiveShellInit = ''
set -U fish_greeting set -U fish_greeting
''; '';
loginShellInit = lib.mkIf config.kyouma.machine-type.graphical '' loginShellInit = ''
[[ $TTY = '/dev/tty1' ]] && exec Hyprland [ (tty) = /dev/tty1 ] ;and exec Hyprland
''; '';
}; };
programs.git = { programs.git = {

View file

@ -1,23 +1,74 @@
{ config, lib, ... }: { { config, inputs, lib, pkgs, ... }: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4
../../common ../../common
../../profiles/graphical ../../profiles/graphical
./hardware-configuration.nix ./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 = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
deployment = { deployment = {
targetHost = "192.168.122.159"; targetHost = "192.168.122.159";
targetUser = "emily"; targetUser = "emily";
}; };
users.mutableUsers = lib.mkForce true;
i18n.defaultLocale = "en_GB.UTF-8"; hardware.bluetooth.enable = true;
networking.hostName = "ryuuko"; hardware.cpu.intel.updateMicrocode = true;
networking.networkmanager.enable = true; hardware.gpgSmartcards.enable = true;
systemd.network.enable = lib.mkForce false; 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.physical = true;
kyouma.machine-type.portable = 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.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" ];
} }

View file

@ -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" ];
};
};
};
};
};
};
};
};
}

View file

@ -33,7 +33,6 @@
# (the default) this is the recommended approach. When using systemd-networkd it's # (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 # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -243,7 +243,7 @@
"animation slide up,Rofi" "animation slide up,Rofi"
]; ];
"$mod" = "ALT"; "$mod" = "SUPER";
"$notifycmd" = "${notifysend} -h string:x-canonical-private-synchronous:hypr-cfg -u low"; "$notifycmd" = "${notifysend} -h string:x-canonical-private-synchronous:hypr-cfg -u low";
bind = [ bind = [
"$mod, Return, exec, ${kitty}" "$mod, Return, exec, ${kitty}"

View file

@ -7,6 +7,10 @@
kyouma-www.url = "git+ssh://git@git.bsd.gay/snaki/kyouma-net.git"; kyouma-www.url = "git+ssh://git@git.bsd.gay/snaki/kyouma-net.git";
secrix.url = "github:Platonic-Systems/secrix"; secrix.url = "github:Platonic-Systems/secrix";
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -34,6 +38,16 @@
imports = [ ./config/hosts/ryuuko/configuration.nix ]; 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; apps.x86_64-linux.secrix = inputs.secrix.secrix self;
devShells.x86_64-linux.default = let devShells.x86_64-linux.default = let
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.x86_64-linux;