From dbada43f82e9504995d841916afc6cf80fa028cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 19 Jul 2022 20:19:10 -0300 Subject: [PATCH] fix suspend and move to labels instead of uuids --- flake.nix | 1 + log | 15 +++++++++++++++ system/configuration.nix | 2 +- system/monolith-hardware-configuration.nix | 13 +++++++++---- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 log diff --git a/flake.nix b/flake.nix index 54ec67d..333c95f 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.lelgenio = import ./user/home.nix; + home-manager.backupFileExtension = "bkp"; # Optionally, use home-manager.extraSpecialArgs to pass # arguments to home.nix } diff --git a/log b/log new file mode 100644 index 0000000..17bc7e1 --- /dev/null +++ b/log @@ -0,0 +1,15 @@ +$ nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixos-rebuild.rAHLyE/nixos-rebuild .#nixosConfigurations."monolith".config.system.build.nixos-rebuild --verbose +warning: Git tree '/home/lelgenio/projects/nixos-config' is dirty +evaluating file '/nix/store/vqny2ayx5bjs9w29n0kimmxq2rax061b-source/flake.nix' +$ exec /nix/store/n05m4wrq8hiwlv1n87q5zfvv4ginp299-nixos-rebuild/bin/nixos-rebuild switch --verbose --flake .# +building the system configuration... +Building in flake mode. +$ nix --extra-experimental-features nix-command flakes build .#nixosConfigurations."monolith".config.system.build.toplevel --verbose --out-link /tmp/nixos-rebuild.3us5Ex/result +warning: Git tree '/home/lelgenio/projects/nixos-config' is dirty +evaluating file '/nix/store/vqny2ayx5bjs9w29n0kimmxq2rax061b-source/flake.nix' +$ sudo --preserve-env=NIXOS_INSTALL_BOOTLOADER -- nix-env -p /nix/var/nix/profiles/system --set /nix/store/zghfi9sjbzjczd21ksnfxys76cqggirq-nixos-system-monolith-22.05.20220714.c06d5fa +$ sudo --preserve-env=NIXOS_INSTALL_BOOTLOADER -- /nix/store/zghfi9sjbzjczd21ksnfxys76cqggirq-nixos-system-monolith-22.05.20220714.c06d5fa/bin/switch-to-configuration switch +leaving systemd-boot 250.4 in place (250.4 is not newer) +stopping the following units: -.mount, boot-efi.mount, home.mount +Failed to stop -.mount: Job type stop is not applicable for unit -.mount. +Terminated diff --git a/system/configuration.nix b/system/configuration.nix index ad6bc6c..3a6e6f7 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -63,7 +63,7 @@ in services.greetd = let swayConfig = pkgs.writeText "greetd-sway-config" '' # `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet. - exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c sway; swaymsg exit" + exec "XDG_CURRENT_DESKTOP=sway GTK_THEME=Orchis-Red-Dark-Compact ${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c sway; swaymsg exit" bindsym Mod4+shift+e exec swaynag \ -t warning \ -m 'What do you want to do?' \ diff --git a/system/monolith-hardware-configuration.nix b/system/monolith-hardware-configuration.nix index 150608c..4076728 100644 --- a/system/monolith-hardware-configuration.nix +++ b/system/monolith-hardware-configuration.nix @@ -14,25 +14,30 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/876ccabe-511b-4cd4-9d4e-5da899c940ca"; + { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; options = [ "subvol=nixos" ]; }; - boot.initrd.luks.devices."main".device = "/dev/disk/by-uuid/325ca6b7-0bcd-469d-bfb1-ba5667342871"; + boot.initrd.luks.devices."main".device = "/dev/disk/by-label/CRYPTROOT"; fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/FF2D-8819"; + { device = "/dev/disk/by-label/NIXBOOT"; fsType = "vfat"; }; fileSystems."/home" = - { device = "/dev/disk/by-uuid/876ccabe-511b-4cd4-9d4e-5da899c940ca"; + { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; options = [ "subvol=home" ]; }; swapDevices = [ ]; + + # TODO: desativar o GPP0 no wakeup acpi + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="pci", DRIVER=="pcieport", ATTR{power/wakeup}="disabled" + ''; # 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