diff options
| author | Miran Bastaja <mbastaja@sorre.xyz> | 2025-01-17 13:57:21 +0100 |
|---|---|---|
| committer | Miran Bastaja <mbastaja@sorre.xyz> | 2025-01-17 13:57:21 +0100 |
| commit | c52e62582e01caa7f7d8a10f2d54c290731d3dcc (patch) | |
| tree | 21ba8be5d1bc993761c2b3b6a93b50d463795ee2 | |
| parent | 1cf72a2389ac0e1537150ca27a49fa53e6951b00 (diff) | |
underworld renistall
| -rw-r--r-- | flake.lock | 58 | ||||
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | hosts/underworld/default.nix | 88 | ||||
| -rw-r--r-- | hosts/underworld/disko.nix | 45 | ||||
| -rw-r--r-- | hosts/underworld/hardware.nix | 34 | ||||
| -rw-r--r-- | hosts/underworld/home.nix | 31 | ||||
| -rw-r--r-- | hosts/wonderland/default.nix | 67 | ||||
| -rw-r--r-- | hosts/wonderland/hardware.nix | 47 | ||||
| -rw-r--r-- | hosts/wonderland/home.nix | 36 | ||||
| -rw-r--r-- | share/hm-modules/hyprdesktop.nix | 32 | ||||
| -rw-r--r-- | share/system/client-common.nix | 10 |
11 files changed, 155 insertions, 295 deletions
@@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1736591904, - "narHash": "sha256-LFO8pSrPKrH8OPq2HaAuBG5skk8/MNJ/9YmK3KsnSks=", + "lastModified": 1737038063, + "narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=", "owner": "nix-community", "repo": "disko", - "rev": "33827d2bd16bfe2e21b62956526c72d313595dfd", + "rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2", "type": "github" }, "original": { @@ -48,11 +48,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1736673161, - "narHash": "sha256-vlN7PcPnDpnIo2hvuHTqFk7CbCcHCQmTQUSijgBCa24=", + "lastModified": 1737044473, + "narHash": "sha256-Yk6OlJlm+UmUUD/u/FhHLZ71H6060YUjcf2TnYvdnTk=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "d376d6c0d09b7c5f4c5c026ae1a0ab53fb09fc77", + "rev": "1efa8d1b4f7bd4103d2301370b296871d525fbe3", "type": "github" }, "original": { @@ -168,11 +168,11 @@ "rev": "aaa51589dd772073c6eb48d6b7bd51dc8be3b455", "revCount": 4, "type": "git", - "url": "https://git.sorre.xyz/miranb/futils" + "url": "https://git.sorre.xyz/miranb/futils.git" }, "original": { "type": "git", - "url": "https://git.sorre.xyz/miranb/futils" + "url": "https://git.sorre.xyz/miranb/futils.git" } }, "futils_2": { @@ -222,11 +222,11 @@ ] }, "locked": { - "lastModified": 1736508663, - "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=", + "lastModified": 1736883540, + "narHash": "sha256-dgPgoPUSg8cGAMqbhQRkww665sZtgzpWXxWjlyqhv94=", "owner": "nix-community", "repo": "home-manager", - "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc", + "rev": "0dfec9deb275854a56c97c356c40ef72e3a2e632", "type": "github" }, "original": { @@ -288,11 +288,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1736523798, - "narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=", + "lastModified": 1736883708, + "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=", "owner": "nixos", "repo": "nixpkgs", - "rev": "130595eba61081acde9001f43de3248d8888ac4a", + "rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8", "type": "github" }, "original": { @@ -348,11 +348,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1736549401, - "narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=", + "lastModified": 1736916166, + "narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899", + "rev": "e24b4c09e963677b1beea49d411cd315a024ad3a", "type": "github" }, "original": { @@ -396,11 +396,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1736523798, - "narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=", + "lastModified": 1736883708, + "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=", "owner": "nixos", "repo": "nixpkgs", - "rev": "130595eba61081acde9001f43de3248d8888ac4a", + "rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8", "type": "github" }, "original": { @@ -487,11 +487,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1736678760, - "narHash": "sha256-xQJsmCsRyhB+flh77hEgcGG/JiJ//y6XLU92NUmdLPQ=", + "lastModified": 1737045796, + "narHash": "sha256-9FBO/ftoAiee5oMfvoEZiGad4Z3H5ri1Tz25yXm+kpE=", "owner": "nix-community", "repo": "nur", - "rev": "f26abd0b9ed40ca143a4dabd3a0daedb1f29ac66", + "rev": "c25c378b7297fad52ed38cc1ea575a49f6b8fbb7", "type": "github" }, "original": { @@ -549,11 +549,11 @@ ] }, "locked": { - "lastModified": 1736649126, - "narHash": "sha256-XCw5sv/ePsroqiF3lJM6Y2X9EhPdHeE47gr3Q8b0UQw=", + "lastModified": 1736994333, + "narHash": "sha256-v4Jrok5yXsZ6dwj2+2uo5cSyUi9fBTurHqHvNHLT1XA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "162ab0edc2936508470199b2e8e6c444a2535019", + "rev": "848db855cb9e88785996e961951659570fc58814", "type": "github" }, "original": { @@ -605,11 +605,11 @@ ] }, "locked": { - "lastModified": 1736515725, - "narHash": "sha256-4P99yL8vGehwzytkpP87eklBePt6aqeEC5JFsIzhfUs=", + "lastModified": 1736808430, + "narHash": "sha256-wlgdf/n7bJMLBheqt1jmPoxJFrUP6FByKQFXuM9YvIk=", "owner": "Mic92", "repo": "sops-nix", - "rev": "f214c1b76c347a4e9c8fb68c73d4293a6820d125", + "rev": "553c7cb22fed19fd60eb310423fdc93045c51ba8", "type": "github" }, "original": { @@ -3,7 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - futils.url = "git+https://git.sorre.xyz/miranb/futils"; + futils.url = "git+https://git.sorre.xyz/miranb/futils.git"; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/underworld/default.nix b/hosts/underworld/default.nix index cf21e1d..a2060a5 100644 --- a/hosts/underworld/default.nix +++ b/hosts/underworld/default.nix @@ -9,7 +9,6 @@ imports = [ # Include the results of the hardware scan. ./hardware.nix - ./disko.nix ./home.nix (flakeRoot + /share/system/client-common.nix) @@ -23,32 +22,74 @@ programs.fish.enable = true; users.defaultUserShell = pkgs.fish; - # Using grub because the disko docs tell me to use it - boot = { - loader.grub = { - enable = true; - efiSupport = true; - efiInstallAsRemovable = true; - }; - }; - + boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot.graceful = true; + boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "underworld"; time.timeZone = "Europe/Zagreb"; + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "hr_HR.UTF-8"; + LC_IDENTIFICATION = "hr_HR.UTF-8"; + LC_MEASUREMENT = "hr_HR.UTF-8"; + LC_MONETARY = "hr_HR.UTF-8"; + LC_NAME = "hr_HR.UTF-8"; + LC_NUMERIC = "hr_HR.UTF-8"; + LC_PAPER = "hr_HR.UTF-8"; + LC_TELEPHONE = "hr_HR.UTF-8"; + LC_TIME = "hr_HR.UTF-8"; + }; + + # Enable the X11 windowing system. + # You can disable this if you're only using the Wayland session. + # services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; users.users = { osiris = { isNormalUser = true; + description = "Miran Bastaja"; extraGroups = [ "wheel" "video" "network" "podman" ]; - uid = 1001; + uid = 1000; }; }; nix.settings.trusted-users = [ "osiris" ]; + services.xserver.displayManager.autoLogin.enable = true; + services.xserver.displayManager.autoLogin.user = "osiris"; fileSystems."/mnt/drive2" = { # No clue how that counts as an UUID, but blkid says so @@ -66,11 +107,22 @@ ]; }; - # 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.11"; # Did you read the comment? + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "24.11"; # Did you read the comment? } diff --git a/hosts/underworld/disko.nix b/hosts/underworld/disko.nix deleted file mode 100644 index e713323..0000000 --- a/hosts/underworld/disko.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/disk/by-id/ata-WDC_WDS240G2G0B-00EPW0_194176803299"; - content = { - type = "gpt"; - partitions = { - boot = { - size = "1M"; - type = "EF02"; # for grub MBR - }; - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - end = "-20G"; - content = { - type = "filesystem"; - format = "bcachefs"; - mountpoint = "/"; - }; - }; - encryptedSwap = { - size = "100%"; - content = { - type = "swap"; - randomEncryption = true; - resumeDevice = true; # resume from hibernation from this device - }; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/underworld/hardware.nix b/hosts/underworld/hardware.nix index b66b797..553036a 100644 --- a/hosts/underworld/hardware.nix +++ b/hosts/underworld/hardware.nix @@ -1,33 +1,37 @@ # 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, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + fileSystems."/" = + { device = "/dev/disk/by-uuid/172392de-fbd1-4710-a994-341aab3dec7c"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5BC6-0D93"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + 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.<interface>.useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp9s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp10s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix index d240194..bb8c57d 100644 --- a/hosts/underworld/home.nix +++ b/hosts/underworld/home.nix @@ -1,6 +1,7 @@ { flakeRoot, inputs, + pkgs, ... }: { @@ -25,6 +26,36 @@ enableGitAnnex = true; }; + xdg = { + systemDirs.data = + let + gds = pkgs.gsettings-desktop-schemas; + gtk3 = pkgs.gtk3; + in + [ + "${gds}/share/gsettings-schemas/${gds.name}" + "${gtk3}/share/gsettings-schemas/${gtk3.name}" + ]; + userDirs = + let + annex = "/mnt/drive2/Annex"; + in + { + enable = true; + createDirectories = true; + + # Disable dirs that I don't use + desktop = null; + publicShare = null; + templates = null; + pictures = "${annex}/Pictures"; + music = "${annex}/Music"; + documents = "${annex}/Documents"; + download = "${annex}/Downloads"; + }; + portal.xdgOpenUsePortal = true; + }; + home.stateVersion = "23.11"; }; diff --git a/hosts/wonderland/default.nix b/hosts/wonderland/default.nix deleted file mode 100644 index 3b024c0..0000000 --- a/hosts/wonderland/default.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ - pkgs, - flakeRoot, - inputs, - ... -}: -{ - imports = [ - # Include the results of the hardware scan. - ./hardware.nix - ./home.nix - (flakeRoot + /share/system/client-common.nix) - { - _module.args = { - inherit inputs; - }; - } - ]; - - programs.fish.enable = true; - users.defaultUserShell = pkgs.fish; - - # Use the systemd-boot EFI boot loader. - boot = { - loader.systemd-boot.enable = true; - loader.efi.canTouchEfiVariables = true; - initrd.kernelModules = [ "amdgpu" ]; - }; - - networking = { - hostName = "wonderland"; - wireless.iwd.enable = true; - }; - - time.timeZone = "Europe/Zagreb"; - i18n.defaultLocale = "en_US.UTF-8"; - - services.upower.enable = true; - hardware.bluetooth.enable = true; - - environment.shellAliases = { - battery-status = '' - upower -i $(upower -e | grep BAT) | grep -E "state|to full|percentage" - ''; - }; - - users.users = { - alice = { - isNormalUser = true; - extraGroups = [ - "wheel" - "video" - "network" - "podman" - ]; - }; - }; - nix.settings.trusted-users = [ "alice" ]; - - # 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 = "22.05"; # Did you read the comment? -} diff --git a/hosts/wonderland/hardware.nix b/hosts/wonderland/hardware.nix deleted file mode 100644 index 8c7246a..0000000 --- a/hosts/wonderland/hardware.nix +++ /dev/null @@ -1,47 +0,0 @@ -# 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 + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/fc1a2a05-efb0-45e7-83f2-2b9dae515b0a"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/FEB7-A352"; - fsType = "vfat"; - }; - - swapDevices = [ { device = "/dev/disk/by-uuid/f16d9af0-4043-4d39-a8d6-e788451f8e9e"; } ]; - - # 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.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; - - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/wonderland/home.nix b/hosts/wonderland/home.nix deleted file mode 100644 index 2cd6dd2..0000000 --- a/hosts/wonderland/home.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - flakeRoot, - inputs, - ... -}: -{ - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - sharedModules = [ - { - imports = [ - (flakeRoot + /share/cfg) - (flakeRoot + /share/cfg/senpai.nix) - ]; - } - ]; - extraSpecialArgs = { - inherit inputs; - }; - }; - - home-manager.users.alice = { - custom.hyprdesktop = { - enable = true; - hasBluetooth = true; - hasBrightnessCtl = true; - hasBattery = true; - enableGitAnnex = true; - }; - - home.stateVersion = "22.05"; - }; # End of users.alice - - home-manager.users.root.home.stateVersion = "22.05"; -} diff --git a/share/hm-modules/hyprdesktop.nix b/share/hm-modules/hyprdesktop.nix index 1e2b21e..233ebde 100644 --- a/share/hm-modules/hyprdesktop.nix +++ b/share/hm-modules/hyprdesktop.nix @@ -181,38 +181,6 @@ in defaultEditor = true; }; - xdg = { - systemDirs.data = - let - gds = pkgs.gsettings-desktop-schemas; - gtk3 = pkgs.gtk3; - in - [ - "${gds}/share/gsettings-schemas/${gds.name}" - "${gtk3}/share/gsettings-schemas/${gtk3.name}" - ]; - userDirs = - let - annex = "${config.home.homeDirectory}/Annex"; - in - { - enable = true; - createDirectories = true; - - # Disable dirs that I don't use - desktop = null; - publicShare = null; - templates = null; - } - // mkIf cfg.enableGitAnnex { - pictures = "${annex}/Pictures"; - music = "${annex}/Music"; - documents = "${annex}/Documents"; - download = "${annex}/Downloads"; - }; - portal.xdgOpenUsePortal = true; - }; - gtk = { theme = { package = pkgs.flat-remix-gtk; diff --git a/share/system/client-common.nix b/share/system/client-common.nix index 31b2d4d..0b7746d 100644 --- a/share/system/client-common.nix +++ b/share/system/client-common.nix @@ -99,9 +99,9 @@ inter ]; - services.earlyoom = { - enable = true; - freeMemThreshold = 5; - extraArgs = [ "--prefer '(^|/)(firefox|chromium|signal|electron)$'" ]; - }; + # services.earlyoom = { + # enable = true; + # freeMemThreshold = 5; + # extraArgs = [ "--prefer '(^|/)(firefox|chromium|signal|electron)$'" ]; + # }; } |
