diff --git a/flake.lock b/flake.lock index 5785f02..1178345 100644 --- a/flake.lock +++ b/flake.lock @@ -96,6 +96,24 @@ "type": "github" } }, + "catppuccin": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1753284130, + "narHash": "sha256-qadXtVNH5qFiD3zIAk7mk6E8kV+TuK86a7TUhs0kouc=", + "owner": "catppuccin", + "repo": "nix", + "rev": "6365c59e7506fd3e6e5050c8184b41aa7410d6e7", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -160,6 +178,24 @@ "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, + "locked": { + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, "locked": { "lastModified": 1741352980, "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", @@ -174,7 +210,7 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -196,7 +232,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nur", @@ -301,11 +337,11 @@ ] }, "locked": { - "lastModified": 1753470191, - "narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=", + "lastModified": 1753373145, + "narHash": "sha256-UhuUj46dobD/POOdVNxKvAvP3luI2T0MZPm2IXl266Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6", + "rev": "64796151f79e6f3834bfc55f07c5487708bb5b3f", "type": "github" }, "original": { @@ -316,7 +352,7 @@ }, "hypr-contrib": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1753252360, @@ -408,11 +444,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1753523167, - "narHash": "sha256-DLVvtdF8zPmL+7dYubnMfK9IIITriecCg7ijLErUTg0=", + "lastModified": 1753310189, + "narHash": "sha256-EgDpsy/2ge/88Zd5ML+m0tyFVwXCeUoPQTOs4YtWZ8w=", "ref": "refs/heads/main", - "rev": "e1fff05d0db9c266679ec7ea1b5734c73d6b0a57", - "revCount": 6314, + "rev": "31cc7f3b87d1d9670b66e73e3720da2e2da49acd", + "revCount": 6311, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -603,7 +639,7 @@ "inputs": { "hyprutils": "hyprutils_2", "hyprwayland-scanner": "hyprwayland-scanner_2", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "systems": "systems_4" }, "locked": { @@ -626,7 +662,7 @@ "hyprlang": "hyprlang_2", "hyprutils": "hyprutils_3", "hyprwayland-scanner": "hyprwayland-scanner_3", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "systems": "systems_5" }, "locked": { @@ -823,6 +859,25 @@ "type": "github" } }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1753367463, + "narHash": "sha256-57dj9Yg+R+70TEjQ2Zd1ytbo+6Tgzd6vBcUWcMDXHWU=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "f459134cf7b4f4f890736063a7cde1cf3b9fb7e6", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1753122741, @@ -855,6 +910,21 @@ } }, "nixpkgs-lib": { + "locked": { + "lastModified": 1751159883, + "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_2": { "locked": { "lastModified": 1740877520, "narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", @@ -869,6 +939,38 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1742800061, + "narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1750f3c1c89488e2ffdd47cab9d05454dddfb734", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1753250450, + "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1657425264, @@ -887,11 +989,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1712163089, - "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", + "lastModified": 1752950548, + "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", + "rev": "c87b95e25065c028d31a94f06a62927d18763fdf", "type": "github" }, "original": { @@ -903,11 +1005,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1712163089, + "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "type": "github" }, "original": { @@ -935,11 +1037,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1753429684, - "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=", + "lastModified": 1748929857, + "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d", + "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", "type": "github" }, "original": { @@ -950,6 +1052,38 @@ } }, "nixpkgs_7": { + "locked": { + "lastModified": 1752900028, + "narHash": "sha256-dPALCtmik9Wr14MGqVXm+OQcv7vhPBXcWNIOThGnB/Q=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6b4955211758ba47fac850c040a27f23b9b4008f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1753250450, + "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { "locked": { "lastModified": 1743315132, "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", @@ -965,50 +1099,18 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1742800061, - "narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1750f3c1c89488e2ffdd47cab9d05454dddfb734", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1753429684, - "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_7", + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_9", "nixvim": "nixvim_2" }, "locked": { - "lastModified": 1753530968, - "narHash": "sha256-mn0wmdFjtZdPQNvReOnyXI8YPCT3arnAKyfuRZuIOiQ=", + "lastModified": 1749898168, + "narHash": "sha256-aOUvfBcLdrNzI1BL+jhPh0y0cFkgjne2tstDb8k1vI0=", "owner": "ahwxorg", "repo": "nixvim-config", - "rev": "bdb8c7c4c77d2757c7e8fdd6e853060ba8287e90", + "rev": "546d385ec71b0ed34abc3f32100e3d0792c349c8", "type": "github" }, "original": { @@ -1019,8 +1121,8 @@ }, "nixvim_2": { "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_8", + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_10", "nuschtosSearch": "nuschtosSearch" }, "locked": { @@ -1039,15 +1141,15 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_9" + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_11" }, "locked": { - "lastModified": 1753530457, - "narHash": "sha256-ElI7ya0YQ07RMDEaF94bQe7Rmz4tr2pKYa+KdRchrEY=", + "lastModified": 1753382346, + "narHash": "sha256-zmwOtA2ug12q+n50PZloOR9BdR/NN+iugdYyTjtKgS0=", "owner": "nix-community", "repo": "NUR", - "rev": "8c37eaf318485018b37efa1006af881c5c7f5616", + "rev": "36c64dfbef717701d0a9cac2ea26e4357d782357", "type": "github" }, "original": { @@ -1108,13 +1210,15 @@ "Hyprspace": "Hyprspace", "agenix": "agenix", "alejandra": "alejandra", + "catppuccin": "catppuccin", "home-manager": "home-manager_2", "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", "hyprpicker": "hyprpicker", "hyprsunset": "hyprsunset", + "nix-gaming": "nix-gaming", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_8", "nixvim": "nixvim", "nur": "nur" } diff --git a/flake.nix b/flake.nix index 34b2afc..5371b3e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { agenix.url = "github:ryantm/agenix"; alejandra.url = "github:kamadorueda/alejandra/3.0.0"; + catppuccin.url = "github:catppuccin/nix"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -24,12 +25,14 @@ nur.url = "github:nix-community/NUR"; nixos-hardware.url = "github:nixos/nixos-hardware"; nixvim.url = "github:ahwxorg/nixvim-config"; + nix-gaming.url = "github:fufexan/nix-gaming"; }; outputs = { self, nixpkgs, + catppuccin, agenix, ... }@inputs: @@ -45,6 +48,16 @@ { overlays.default = overlays.addition; nixosConfigurations = { + desktop = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + (import ./hosts/desktop) + ]; + specialArgs = { + host = "desktop"; + inherit self inputs username; + }; + }; sakura = nixpkgs.lib.nixosSystem { inherit system; modules = [ @@ -111,14 +124,14 @@ inherit self inputs username; }; }; - zinnia = nixpkgs.lib.nixosSystem { + + vm = nixpkgs.lib.nixosSystem { inherit system; modules = [ - (import ./hosts/zinnia) - agenix.nixosModules.default + (import ./hosts/vm) ]; specialArgs = { - host = "zinnia"; + host = "vm"; inherit self inputs username; }; }; diff --git a/hosts/dandelion/default.nix b/hosts/dandelion/default.nix index afee27e..313dbc2 100644 --- a/hosts/dandelion/default.nix +++ b/hosts/dandelion/default.nix @@ -60,16 +60,10 @@ trim.enable = true; }; - boot.zfs.extraPools = [ "spinners" ]; + # boot.zfs.extraPools = [ "terrabite" ]; - fileSystems = { - "/spinners/rootvol" = { - device = "terrabite/rootvol"; - fsType = "zfs"; - }; - "/spinners/ahwx" = { - device = "terrabite/ahwx"; - fsType = "zfs"; - }; - }; + # fileSystems."/terrabite/main" = { + # device = "terrabite/main"; + # fsType = "zfs"; + # }; } diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix new file mode 100644 index 0000000..555e686 --- /dev/null +++ b/hosts/desktop/default.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +{ + imports = [ + ./hardware-configuration.nix + ./../../modules/core + ]; + + nixpkgs.config.permittedInsecurePackages = [ + "jitsi-meet-1.0.8043" + "olm-3.2.16" + ]; + + liv.desktop.enable = true; + liv.gui.enable = true; +} diff --git a/hosts/zinnia/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix similarity index 60% rename from hosts/zinnia/hardware-configuration.nix rename to hosts/desktop/hardware-configuration.nix index eb9890f..3cf9604 100644 --- a/hosts/zinnia/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -5,30 +5,26 @@ { imports = - [ (modulesPath + "/hardware/network/broadcom-43xx.nix") - (modulesPath + "/installer/scan/not-detected.nix") + [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/c9f69c59-2014-41de-b169-53c38c7d9f15"; + { device = "/dev/disk/by-uuid/6b518d54-a144-42fe-b500-b6651038bbcc"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-ad0e2f90-490d-4a2b-8484-8d18bc9bdff5".device = "/dev/disk/by-uuid/ad0e2f90-490d-4a2b-8484-8d18bc9bdff5"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0AEC-87AF"; + { device = "/dev/disk/by-uuid/D1A5-9B92"; fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; }; swapDevices = - [ { device = "/dev/disk/by-uuid/18a2707c-9fe0-4dc4-a15f-6908cc34f26e"; } + [ { device = "/dev/disk/by-uuid/2d69abc2-3d44-481b-ada8-b436c2b9c8c2"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -37,9 +33,9 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wwp0s20f0u2c2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.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/ichiyo/default.nix b/hosts/ichiyo/default.nix index 527fb84..f56d168 100644 --- a/hosts/ichiyo/default.nix +++ b/hosts/ichiyo/default.nix @@ -11,6 +11,9 @@ ./../../modules/core ]; + # Enable fancy boot animations + boot.plymouth.enable = true; + powerManagement = { enable = true; # powertop.enable = true; diff --git a/hosts/sakura/default.nix b/hosts/sakura/default.nix index f44da1b..99124c4 100644 --- a/hosts/sakura/default.nix +++ b/hosts/sakura/default.nix @@ -71,12 +71,8 @@ ${pkgs.fw-ectool}/bin/ectool led battery auto ''; }; - systemd.sleep.extraConfig = '' - HibernateDelaySec=30m - ''; - services.logind.lidSwitch = "suspend-then-hibernate"; boot = { - # plymouth.enable = true; # is a module now + plymouth.enable = true; kernelParams = [ "mem_sleep_default=deep" "acpi_osi=\"!Windows 2020\"" # otherwise GPU does weird shit that makes the computer look like the RAM is broken @@ -93,11 +89,7 @@ [ acpi_call cpupower - v4l2loopback ] ++ [ pkgs.cpupower-gui ]; - extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 - ''; }; } diff --git a/hosts/violet/default.nix b/hosts/violet/default.nix index bc15f41..8aa285d 100644 --- a/hosts/violet/default.nix +++ b/hosts/violet/default.nix @@ -33,14 +33,6 @@ xserver.videoDrivers = [ "nvidia" ]; }; - networking.firewall = { - allowedTCPPorts = [ - 80 - 443 - 25565 - ]; - }; - liv.nvidia.enable = true; boot = { diff --git a/hosts/vm/default.nix b/hosts/vm/default.nix new file mode 100644 index 0000000..b0a72a8 --- /dev/null +++ b/hosts/vm/default.nix @@ -0,0 +1,36 @@ +{ pkgs, config, lib, ... }: +{ + imports = [ + ./hardware-configuration.nix + ./../../modules/core + ]; + + nixpkgs.config.permittedInsecurePackages = [ + "jitsi-meet-1.0.8043" + "olm-3.2.16" + ]; + + + # kvm/qemu doesn't use UEFI firmware mode by default. + # so we force-override the setting here + # and configure GRUB instead. + boot.loader = { + systemd-boot.enable = lib.mkForce false; + grub = { + enable = true; + device = "/dev/vda"; + useOSProber = false; + }; + }; + + # allow local remote access to make it easier to toy around with the system + services.openssh = { + enable = true; + ports = [22]; + settings = { + # PasswordAuthentication = lib.mkOverride true; + AllowUsers = null; + # PermitRootLogin = "yes"; + }; + }; +} diff --git a/hosts/vm/hardware-configuration.nix b/hosts/vm/hardware-configuration.nix new file mode 100644 index 0000000..7cd128a --- /dev/null +++ b/hosts/vm/hardware-configuration.nix @@ -0,0 +1,31 @@ +# 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, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/631775ef-6851-4fe7-997f-189372f87437"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # 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.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/hosts/zinnia/default.nix b/hosts/zinnia/default.nix deleted file mode 100644 index f7ba60b..0000000 --- a/hosts/zinnia/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: - -{ - imports = [ - ./hardware-configuration.nix - ./../../modules/core - ./../../modules/services/tailscale.nix - ./../../modules/services/mpd.nix - ]; - - liv = { - laptop.enable = true; - gui.enable = true; - desktop.enable = false; - creative.enable = false; - amdgpu.enable = false; - }; - - services = { - vnstat.enable = true; - }; - - networking.hostName = "zinnia"; - - powerManagement = { - enable = true; - powertop.enable = true; - cpuFreqGovernor = lib.mkDefault "ondemand"; - }; - - boot.initrd.luks.devices."luks-59aff546-c2c2-4697-a5f2-40a12f259f5a".device = - "/dev/disk/by-uuid/59aff546-c2c2-4697-a5f2-40a12f259f5a"; - - boot = { - kernelParams = [ - "mem_sleep_default=deep" - ]; - kernelModules = [ "acpi_call" ]; - kernelPackages = pkgs.linuxPackages_latest; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - systemd-boot.configurationLimit = 10; - }; - extraModulePackages = - with config.boot.kernelPackages; - [ - acpi_call - cpupower - ] - ++ [ pkgs.cpupower-gui ]; - }; - - time.timeZone = "Europe/Amsterdam"; - nixpkgs.config.allowUnfree = true; -} diff --git a/modules/core/default.nix b/modules/core/default.nix index 10c17fa..36b87a6 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -9,7 +9,6 @@ ++ [ (import ./network.nix) ] ++ [ (import ./pipewire.nix) ] ++ [ (import ./program.nix) ] - ++ [ (import ./plymouth.nix) ] ++ [ (import ./sshd.nix) ] ++ [ (import ./security.nix) ] ++ [ (import ./services.nix) ] @@ -17,5 +16,6 @@ ++ [ (import ./user.nix) ] ++ [ (import ./bluetooth.nix) ] ++ [ (import ./yubikey.nix) ] + # ++ [ (import ./steam.nix) ] ++ [ (import ./wayland.nix) ]; } diff --git a/modules/core/network.nix b/modules/core/network.nix index 919bb45..2c80cdb 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -1,13 +1,20 @@ -{ pkgs, ... }: +{ pkgs, ... }: { networking = { networkmanager.enable = true; nameservers = [ "9.9.9.9" ]; firewall = { enable = true; + # allowedTCPPorts = [ 22 80 443 59010 59011 ]; + # allowedUDPPorts = [ 59010 59011 ]; + # allowedUDPPortRanges = [ + # { from = 4000; to = 4007; } + # { from = 8000; to = 8010; } + # ]; }; }; - services = { - avahi.enable = false; - }; + + # environment.systemPackages = with pkgs; [ + # networkmanagerapplet + # ]; } diff --git a/modules/core/plymouth.nix b/modules/core/plymouth.nix deleted file mode 100644 index 384b4b6..0000000 --- a/modules/core/plymouth.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - pkgs, - lib, - ... -}: -{ - # TODO: add https://github.com/FraioVeio/plymouth-xp-theme - boot = { - plymouth = { - enable = lib.mkDefault true; - theme = "lone"; - themePackages = with pkgs; [ - # By default we would install all themes - (adi1090x-plymouth-themes.override { - selected_themes = [ "lone" ]; - # selected_themes = [ "sliced" ]; - # selected_themes = [ "rings" ]; - # selected_themes = [ "red_loader" ]; - # selected_themes = [ "dna" ]; - # selected_themes = [ "hexagon_dots" ]; - }) - ]; - }; - - # Enable "Silent boot" - consoleLogLevel = 3; - initrd.verbose = false; - kernelParams = [ - "quiet" - "splash" - "boot.shell_on_fail" - "udev.log_priority=3" - "rd.systemd.show_status=auto" - ]; - # Hide the OS choice for bootloaders. - # It's still possible to open the bootloader list by pressing any key - # It will just not appear on screen unless a key is pressed - loader.timeout = 1; - }; -} diff --git a/modules/core/sshd.nix b/modules/core/sshd.nix index 9cccd6d..36f4637 100644 --- a/modules/core/sshd.nix +++ b/modules/core/sshd.nix @@ -14,11 +14,9 @@ networking.firewall.allowedTCPPorts = config.services.openssh.ports; users.users.liv.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGXi00z/rxVrWLKgYr+tWIsbHsSQO75hUMSTThNm5wUw liv@sakura" # sakura - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHv2zxCy22KU1tZOH2hA1p8fWVpOSrTYF68+3E5r330O liv@ichiyo" # ichiyo - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEDltZ7vfyrLrl32TIWCC3iUx40TrCtIz6Ssi/SZvikg liv@zinnia" # zinnia - + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGXi00z/rxVrWLKgYr+tWIsbHsSQO75hUMSTThNm5wUw liv@sakura" # main laptop + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ2nsQHyWnrmuQway0ehoMUcYYfhD8Ph/vpD0Tzip1b1 liv@meow" # main phone + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHv2zxCy22KU1tZOH2hA1p8fWVpOSrTYF68+3E5r330O liv@ichiyo" # 2nd laptop "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mHVQp99G0osUAtnVoq5TARR8x5wjCkdbe7ChnzLRa liv@azalea" # linux phone - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ2nsQHyWnrmuQway0ehoMUcYYfhD8Ph/vpD0Tzip1b1 liv@meow" # xz1c ]; } diff --git a/modules/core/steam.nix b/modules/core/steam.nix new file mode 100644 index 0000000..0901a55 --- /dev/null +++ b/modules/core/steam.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + }; +} diff --git a/modules/core/system.nix b/modules/core/system.nix index 3fff33f..7ac70fe 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -1,20 +1,12 @@ +{ self, pkgs, lib, inputs, ...}: { - self, - pkgs, - lib, - inputs, - ... -}: -{ + # imports = [ inputs.nix-gaming.nixosModules.default ]; nix = { settings = { auto-optimise-store = true; - experimental-features = [ - "nix-command" - "flakes" - ]; - # substituters = [ "" ]; - # trusted-public-keys = [ "" ]; + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ "https://nix-gaming.cachix.org" ]; + trusted-public-keys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" ]; }; gc = { automatic = true; @@ -49,7 +41,7 @@ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" ]; - + # Font packages environment.systemPackages = with pkgs; [ noto-fonts-cjk-sans diff --git a/modules/core/user.nix b/modules/core/user.nix index a6b72b9..5ddb8db 100644 --- a/modules/core/user.nix +++ b/modules/core/user.nix @@ -17,7 +17,9 @@ extraSpecialArgs = { inherit inputs username host; }; users.${username} = { imports = - if (host == "violet") then + if (host == "desktop") then + [ ./../home/default.desktop.nix ] + else if (host == "violet") then [ ./../home/default.server.nix ] else if (host == "dandelion") then [ ./../home/default.server.nix ] diff --git a/modules/home/default.desktop.nix b/modules/home/default.desktop.nix new file mode 100644 index 0000000..4e658d9 --- /dev/null +++ b/modules/home/default.desktop.nix @@ -0,0 +1,5 @@ +{ ...}: { + imports = + [(import ./default.nix)] + ++ [ (import ./steam.nix) ]; +} diff --git a/modules/home/gaming.nix b/modules/home/gaming.nix new file mode 100644 index 0000000..c9e167f --- /dev/null +++ b/modules/home/gaming.nix @@ -0,0 +1,10 @@ +{ pkgs, config, inputs, ... }: +{ + home.packages = with pkgs;[ + ## Utils + # gamemode + # gamescope + # winetricks + # inputs.nix-gaming.packages.${pkgs.system}.wine-ge + ]; +} diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index 5452bb1..a014d1e 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -1,4 +1,4 @@ -{ pkgs, host, ... }: +{ pkgs, ... }: { fonts.fontconfig.enable = true; home.packages = [ @@ -58,14 +58,7 @@ source = "~/nixos-config/modules/home/hyprland/displays.conf"; "debug:disable_scale_checks" = true; - # monitor = "eDP-1, 2256x1504@60, 0x0, 1.5"; - monitor = - if (host == "sakura") then - "eDP-1, 2256x1504@60, 0x0, 1.5" - else if (host == "zinnia") then - "eDP-1, 1920x1080@60, 0x0, 1.0" - else - ", preferred, auto, 1"; + monitor = "eDP-1, 2256x1504@60, 0x0, 1.5"; # autostart exec-once = [ diff --git a/modules/home/kitty.nix b/modules/home/kitty.nix index 3f20039..cac7f8c 100644 --- a/modules/home/kitty.nix +++ b/modules/home/kitty.nix @@ -12,7 +12,7 @@ settings = { confirm_os_window_close = 0; - background_opacity = "0.25"; + background_opacity = "0.75"; window_padding_width = 10; scrollback_lines = 10000; enable_audio_bell = false; diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 53f5652..4c503db 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -62,13 +62,6 @@ android-tools sshpass - # Install pip packages - # python3 - # python3Packages.pip - # (writeShellScriptBin "install-pip-packages" '' # This script does not run, yet. - # pip install --user --break-system-packages - # '') - # GUI shit element-desktop gajim diff --git a/modules/home/steam.nix b/modules/home/steam.nix new file mode 100644 index 0000000..4b559a5 --- /dev/null +++ b/modules/home/steam.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, ... }: +{ + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = false; + }; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-runtime" + ]; + # proton-ge-bin + +# warning: The package proton-ge in nix-gaming has been deprecated as of 2024-03-17. + +# You should use proton-ge-bin from Nixpkgs, which conforms to +# the new `extraCompatTools` module option under `programs.steam` +# For details, see the relevant pull request: +} diff --git a/modules/home/waybar/default.nix b/modules/home/waybar/default.nix index 5572f57..184134c 100644 --- a/modules/home/waybar/default.nix +++ b/modules/home/waybar/default.nix @@ -23,8 +23,8 @@ "/home/${username}/.config/waybar/config" = { text = '' [{ - "layer": "bottom", - "position": "bottom", + "layer": "top", + "position": "top", "modules-left": [ "privacy", @@ -377,9 +377,9 @@ /* margin: 0 0px; */ } - window#waybar.bottom { + window#waybar.top { /* background-color: rgba(115, 116, 116, 0.22); */ - background-color: rgba(0, 0, 0, 0.25); + background-color: rgba(0, 0, 0, 0.75); border-bottom: none; color: #eeeeee; transition-property: background-color; @@ -387,7 +387,7 @@ } window#waybar.hidden { - opacity: 0.25; + opacity: 0.5; } label#window { diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index 28fde10..8082e59 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -7,6 +7,7 @@ }: { programs = { + command-not-found.enable = true; zsh = { enable = true; autocd = true; @@ -109,20 +110,6 @@ printf "%s\n" "''${url}" } - function nixcd () { - PACKAGE_NAME="$1" - if [[ "$PACKAGE_NAME" = "" ]]; then - echo "Usage: nixcd " - fi - PKGINSTORE="$(NIXPKGS_ALLOW_UNFREE=1 nix path-info nixpkgs#$PACKAGE_NAME --impure)" - if [[ -d "$PKGINSTORE" ]]; then - cd $PKGINSTORE - else - echo "Could not find path for package: $PKGINSTORE" - return 1 - fi - } - export export PATH="''${PATH}:''${HOME}/.local/bin/:''${HOME}/.cargo/bin/:''${HOME}/.fzf/bin/" # if [[ $(which sxiv&>/dev/null && echo 1) == "1" ]]; then @@ -147,7 +134,6 @@ gcm = "git commit -m"; gph = "git push -u origin main"; g = "git"; - gp = "git pull"; calc = "eva"; wikipedia = "wikit"; diff --git a/modules/services/dandelion.nix b/modules/services/dandelion.nix index c11eff1..6bd0cd9 100644 --- a/modules/services/dandelion.nix +++ b/modules/services/dandelion.nix @@ -2,8 +2,8 @@ { imports = [ (import ./docker.nix) ] - # ++ [ (import ./immich.nix) ] - # ++ [ (import ./nextcloud.nix) ] + ++ [ (import ./immich.nix) ] + ++ [ (import ./nextcloud.nix) ] ++ [ (import ./home-assistant.nix) ] ++ [ (import ./monitoring.nix) ] ++ [ (import ./smart-monitoring.nix) ]