diff --git a/flake.nix b/flake.nix index 82f5c76..94badde 100644 --- a/flake.nix +++ b/flake.nix @@ -9,11 +9,13 @@ url = "github:Flameopathic/home-manager/release-24.05"; # TODO: change back once vesktop module is merged inputs.nixpkgs.follows = "nixpkgs"; # ensures nixpkgs version is consistent between home manager and system }; - nix-darwin = { # declarative macOS with nix + nix-darwin = { + # declarative macOS with nix url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; - lanzaboote = { # secure boot + lanzaboote = { + # secure boot url = "github:nix-community/lanzaboote/v0.3.0"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -21,11 +23,13 @@ url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; - disko = { # declarative disks + disko = { + # declarative disks url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; - vscode-server = { # makes remote servers work + vscode-server = { + # makes remote servers work url = "github:nix-community/nixos-vscode-server"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -33,128 +37,132 @@ }; outputs = { ... }@inputs: with inputs; { - nixosConfigurations = let - mkHost = host: { modules ? [], home-modules ? [], system ? "x86_64-linux", specialArgs ? { inherit inputs; }, ... }: nixpkgs.lib.nixosSystem { - system = system; - modules = modules ++ [ - ({ ... }: { - networking.hostName = host; - }) - ./mod - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = false; - extraSpecialArgs = { inherit inputs; }; - users.flame = { - imports = home-modules ++ [ - ./mod-hm - ] ++ nixpkgs.lib.optional (builtins.pathExists ./host/${host}/home.nix) ./host/${host}/home.nix; + nixosConfigurations = + let + mkHost = host: { modules ? [ ], home-modules ? [ ], system ? "x86_64-linux", specialArgs ? { inherit inputs; }, ... }: nixpkgs.lib.nixosSystem { + system = system; + modules = modules ++ [ + ({ ... }: { + networking.hostName = host; + }) + ./mod + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = false; + extraSpecialArgs = { inherit inputs; }; + users.flame = { + imports = home-modules ++ [ + ./mod-hm + ] ++ nixpkgs.lib.optional (builtins.pathExists ./host/${host}/home.nix) ./host/${host}/home.nix; + }; }; - }; - } - ] ++ nixpkgs.lib.optional (builtins.pathExists ./host/${host}/hardware-configuration.nix) ./host/${host}/hardware-configuration.nix - ++ nixpkgs.lib.optional (builtins.pathExists ./host/${host}/configuration.nix) ./host/${host}/configuration.nix; - specialArgs = specialArgs; - }; + } + ] ++ nixpkgs.lib.optional (builtins.pathExists ./host/${host}/hardware-configuration.nix) ./host/${host}/hardware-configuration.nix + ++ nixpkgs.lib.optional (builtins.pathExists ./host/${host}/configuration.nix) ./host/${host}/configuration.nix; + specialArgs = specialArgs; + }; - in builtins.mapAttrs mkHost { - # make configuration name same as host name to make rebuild command work automagically - # system default is "x86_64-linux" - # modules default to ./mod and ./host/${host}/configuration.nix - # specialArgs defaults to inheriting inputs alone - fnix2 = { - modules = [ - ./mod/sd-boot.nix - ./mod/ui.nix - ./mod/hyprland.nix - ./mod/nvidia.nix - ./mod/remote-builder.nix - ./mod/ssh-server.nix - ./mod/syncthing.nix - ]; - home-modules = [ - { - flame.hyprland.monitor = [ "Unknown-1, disabled" "DP-1, highres, 0x0, auto" "HDMI-A-1, highres, 3200x1440, 1" ]; - } - ./mod-hm/ui-apps.nix - ]; - }; - surfnix = { - modules = [ - ./mod/sd-boot.nix - ./mod/ui.nix - ./mod/hyprland.nix - ./mod/surface.nix - ./mod/syncthing.nix - ]; - home-modules = [ - { - flame.hyprland.monitor = [ "eDP-1, preferred, 1920x0, auto" "DP-1, preferred, 0x0, 1" ]; - } - ./mod-hm/ui-apps.nix - ]; - }; - servnix = { - system = "aarch64-linux"; - modules = [ - ./mod/rpi-boot.nix - ./mod/ssh-server.nix - ./mod/syncthing.nix - { - flame.syncthing.server = true; - } - ]; - }; - shaktop = { - modules = [ - ./mod/sd-boot.nix - ./mod/mc-server.nix - ./mod/laptop-server.nix - ./mod/ssh-server.nix - ./mod/unturned.nix - { - flame.ssh-server.openFirewall = true; - } - ]; + in + builtins.mapAttrs mkHost { + # make configuration name same as host name to make rebuild command work automagically + # system default is "x86_64-linux" + # modules default to ./mod and ./host/${host}/configuration.nix + # specialArgs defaults to inheriting inputs alone + fnix2 = { + modules = [ + ./mod/sd-boot.nix + ./mod/ui.nix + ./mod/hyprland.nix + ./mod/nvidia.nix + ./mod/remote-builder.nix + ./mod/ssh-server.nix + ./mod/syncthing.nix + ]; + home-modules = [ + { + flame.hyprland.monitor = [ "Unknown-1, disabled" "DP-1, highres, 0x0, auto" "HDMI-A-1, highres, 3200x1440, 1" ]; + } + ./mod-hm/ui-apps.nix + ]; + }; + surfnix = { + modules = [ + ./mod/sd-boot.nix + ./mod/ui.nix + ./mod/hyprland.nix + ./mod/surface.nix + ./mod/syncthing.nix + ]; + home-modules = [ + { + flame.hyprland.monitor = [ "eDP-1, preferred, 1920x0, auto" "DP-1, preferred, 0x0, 1" ]; + } + ./mod-hm/ui-apps.nix + ]; + }; + servnix = { + system = "aarch64-linux"; + modules = [ + ./mod/rpi-boot.nix + ./mod/ssh-server.nix + ./mod/syncthing.nix + { + flame.syncthing.server = true; + } + ]; + }; + shaktop = { + modules = [ + ./mod/sd-boot.nix + ./mod/mc-server.nix + ./mod/laptop-server.nix + ./mod/ssh-server.nix + ./mod/unturned.nix + { + flame.ssh-server.openFirewall = true; + } + ]; + }; + acervnix = { + modules = [ + disko.nixosModules.disko + ./host/acervnix/disk-config.nix + ./mod/sd-boot.nix + ./mod/ssh-server.nix + ./mod/laptop-server.nix + ]; + }; }; - acervnix = { - modules = [ - disko.nixosModules.disko - ./host/acervnix/disk-config.nix - ./mod/sd-boot.nix - ./mod/ssh-server.nix - ./mod/laptop-server.nix - ]; - }; - }; - darwinConfigurations = let - mkDarwin = host: { modules ? [], home-modules ? [], system ? "x86_64-darwin", specialArgs ? { inherit inputs; }, ... }: nix-darwin.lib.darwinSystem { - modules = modules ++ [ - ({ ... }: { - networking.hostName = host; - nixpkgs.hostPlatform = system; - }) - ./host/${host}/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { inherit inputs; }; - users.flame = { - imports = home-modules ++ [ - ./mod-hm - ]; + darwinConfigurations = + let + mkDarwin = host: { modules ? [ ], home-modules ? [ ], system ? "x86_64-darwin", specialArgs ? { inherit inputs; }, ... }: nix-darwin.lib.darwinSystem { + modules = modules ++ [ + ({ ... }: { + networking.hostName = host; + nixpkgs.hostPlatform = system; + }) + ./host/${host}/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { inherit inputs; }; + users.flame = { + imports = home-modules ++ [ + ./mod-hm + ]; + }; }; - }; - } - ]; - specialArgs = specialArgs; + } + ]; + specialArgs = specialArgs; + }; + in + builtins.mapAttrs mkDarwin { + bear = { }; }; - in builtins.mapAttrs mkDarwin { - bear = {}; - }; }; } diff --git a/host/acervnix/configuration.nix b/host/acervnix/configuration.nix index 93dc759..cdc8d7d 100644 --- a/host/acervnix/configuration.nix +++ b/host/acervnix/configuration.nix @@ -1,3 +1,3 @@ { ... }: { system.stateVersion = "24.11"; -} \ No newline at end of file +} diff --git a/host/acervnix/disk-config.nix b/host/acervnix/disk-config.nix index 825a986..2903182 100644 --- a/host/acervnix/disk-config.nix +++ b/host/acervnix/disk-config.nix @@ -38,4 +38,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/host/acervnix/hardware-configuration.nix b/host/acervnix/hardware-configuration.nix index 7ec3cbf..d840eef 100644 --- a/host/acervnix/hardware-configuration.nix +++ b/host/acervnix/hardware-configuration.nix @@ -1,10 +1,10 @@ { lib, config, ... }: { boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ]; - boot.initrd.kernelModules = []; + boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm_intel" ]; - boot.extraModulePackages = []; + boot.extraModulePackages = [ ]; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} \ No newline at end of file +} diff --git a/host/acervnix/home.nix b/host/acervnix/home.nix index 23669d1..1a814fc 100644 --- a/host/acervnix/home.nix +++ b/host/acervnix/home.nix @@ -1,3 +1,3 @@ { home.stateVersion = "24.05"; # home manager can be updated without changing this - read documentation -} \ No newline at end of file +} diff --git a/host/fnix2/configuration.nix b/host/fnix2/configuration.nix index aed4a42..e958033 100644 --- a/host/fnix2/configuration.nix +++ b/host/fnix2/configuration.nix @@ -7,7 +7,7 @@ environment.systemPackages = with pkgs; [ solaar - (pkgs.callPackage ../../pkgs/wl-clicker {}) + (pkgs.callPackage ../../pkgs/wl-clicker { }) ]; system.stateVersion = "23.11"; # shouldn't be changed diff --git a/host/fnix2/hardware-configuration.nix b/host/fnix2/hardware-configuration.nix index 51712c9..feb9dc7 100644 --- a/host/fnix2/hardware-configuration.nix +++ b/host/fnix2/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ]; @@ -14,18 +15,19 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-label/nixos"; + { + device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-label/boot"; + { + device = "/dev/disk/by-label/boot"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-label/swap"; } - ]; + [{ device = "/dev/disk/by-label/swap"; }]; # 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 diff --git a/host/fnix2/home.nix b/host/fnix2/home.nix index 2cccfde..350a846 100644 --- a/host/fnix2/home.nix +++ b/host/fnix2/home.nix @@ -1,3 +1,3 @@ { home.stateVersion = "23.11"; # home manager can be updated without changing this - read documentation -} \ No newline at end of file +} diff --git a/host/servnix/configuration.nix b/host/servnix/configuration.nix index 3ad49bb..9b13028 100644 --- a/host/servnix/configuration.nix +++ b/host/servnix/configuration.nix @@ -1,3 +1,3 @@ { ... }: { - system.stateVersion = "23.11"; # read docs before changing + system.stateVersion = "23.11"; # read docs before changing } diff --git a/host/servnix/hardware-configuration.nix b/host/servnix/hardware-configuration.nix index 735a1e7..0eb7a2d 100644 --- a/host/servnix/hardware-configuration.nix +++ b/host/servnix/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" ]; @@ -14,12 +15,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; + { + device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; fsType = "ext4"; }; fileSystems."/home/flame" = - { device = "/dev/md0"; + { + device = "/dev/md0"; fsType = "ext4"; }; diff --git a/host/servnix/home.nix b/host/servnix/home.nix index 2cccfde..350a846 100644 --- a/host/servnix/home.nix +++ b/host/servnix/home.nix @@ -1,3 +1,3 @@ { home.stateVersion = "23.11"; # home manager can be updated without changing this - read documentation -} \ No newline at end of file +} diff --git a/host/shaktop/configuration.nix b/host/shaktop/configuration.nix index 30f82fb..94cf532 100644 --- a/host/shaktop/configuration.nix +++ b/host/shaktop/configuration.nix @@ -3,4 +3,3 @@ system.stateVersion = "23.11"; # Did you read the comment? } - diff --git a/host/shaktop/hardware-configuration.nix b/host/shaktop/hardware-configuration.nix index 3b06947..d56c058 100644 --- a/host/shaktop/hardware-configuration.nix +++ b/host/shaktop/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; @@ -14,19 +15,20 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/a671923e-50a3-48f8-aad2-81aa399b5e73"; + { + device = "/dev/disk/by-uuid/a671923e-50a3-48f8-aad2-81aa399b5e73"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0D1B-6B5D"; + { + device = "/dev/disk/by-uuid/0D1B-6B5D"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; swapDevices = - [ { device = "/dev/disk/by-uuid/22a8ed7b-c6dd-4c88-9704-609e681b7b1f"; } - ]; + [{ device = "/dev/disk/by-uuid/22a8ed7b-c6dd-4c88-9704-609e681b7b1f"; }]; # 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 diff --git a/host/shaktop/home.nix b/host/shaktop/home.nix index 2cccfde..350a846 100644 --- a/host/shaktop/home.nix +++ b/host/shaktop/home.nix @@ -1,3 +1,3 @@ { home.stateVersion = "23.11"; # home manager can be updated without changing this - read documentation -} \ No newline at end of file +} diff --git a/host/surfnix/configuration.nix b/host/surfnix/configuration.nix index e3daa20..8c88f3b 100644 --- a/host/surfnix/configuration.nix +++ b/host/surfnix/configuration.nix @@ -1,4 +1,4 @@ -{ ... }: { +{ ... }: { programs = { steam.enable = true; }; @@ -10,4 +10,3 @@ system.stateVersion = "23.11"; } - diff --git a/host/surfnix/hardware-configuration.nix b/host/surfnix/hardware-configuration.nix index ee1e64c..24ba592 100644 --- a/host/surfnix/hardware-configuration.nix +++ b/host/surfnix/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; @@ -14,24 +15,26 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/5d4e35d3-a06b-45d8-8b0c-11b9bd998dc1"; + { + device = "/dev/disk/by-uuid/5d4e35d3-a06b-45d8-8b0c-11b9bd998dc1"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/F1E8-03CD"; + { + device = "/dev/disk/by-uuid/F1E8-03CD"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; fileSystems."/home/flame/doc/Nextcloud Backup" = - { device = "/dev/disk/by-uuid/723a3feb-0852-4346-b5b9-b72153a79ec0"; + { + device = "/dev/disk/by-uuid/723a3feb-0852-4346-b5b9-b72153a79ec0"; fsType = "ext4"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/fddaeb1c-e259-4ffb-9eda-03a39dd3e618"; } - ]; + [{ device = "/dev/disk/by-uuid/fddaeb1c-e259-4ffb-9eda-03a39dd3e618"; }]; # 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 diff --git a/host/surfnix/home.nix b/host/surfnix/home.nix index 2cccfde..350a846 100644 --- a/host/surfnix/home.nix +++ b/host/surfnix/home.nix @@ -1,3 +1,3 @@ { home.stateVersion = "23.11"; # home manager can be updated without changing this - read documentation -} \ No newline at end of file +} diff --git a/mod-hm/default.nix b/mod-hm/default.nix index d84d53e..0d2d6f1 100644 --- a/mod-hm/default.nix +++ b/mod-hm/default.nix @@ -37,7 +37,7 @@ enable = true; defaultEditor = true; }; - }; + }; programs.home-manager.enable = true; }; diff --git a/mod-hm/hypridle.nix b/mod-hm/hypridle.nix index 91808c5..65f8eaf 100644 --- a/mod-hm/hypridle.nix +++ b/mod-hm/hypridle.nix @@ -1,14 +1,14 @@ { pkgs, config, inputs, ... }: { config = { services.hypridle = { - enable = true; - settings = { - general = { - before_sleep_cmd = "hyprlock"; - }; + enable = true; + settings = { + general = { + before_sleep_cmd = "hyprlock"; }; }; - + }; + programs.hyprlock = { enable = true; settings = { @@ -38,4 +38,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/mod-hm/hyprland.nix b/mod-hm/hyprland.nix index 5a449db..295ef1b 100644 --- a/mod-hm/hyprland.nix +++ b/mod-hm/hyprland.nix @@ -1,7 +1,8 @@ { config, pkgs, lib, ... }: let cfg = config.flame.hyprland; -in { +in +{ imports = [ ./waybar.nix ./hypridle.nix @@ -17,7 +18,7 @@ in { description = "name of image in /etc/nixos/resources"; }; }; - + config = { # notification daemon services.mako = { @@ -106,11 +107,13 @@ in { "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ]; - bindl = [ # works even when a lockscreen is active + bindl = [ + # works even when a lockscreen is active ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle" ", switch:on:Lid Switch, exec, systemctl suspend" ]; - bindel = [ # repeat and work on lockscreen + bindel = [ + # repeat and work on lockscreen # brightness and volume ", XF86MonBrightnessDown, exec, brillo -q -u 150000 -U 2" ", XF86MonBrightnessUp, exec, brillo -q -u 150000 -A 2" @@ -138,19 +141,19 @@ in { "$mod, m, exit," - # focus - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" - "$mod, h, movefocus, l" - "$mod, l, movefocus, r" - "$mod, k, movefocus, u" - "$mod, j, movefocus, d" + # focus + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + "$mod, h, movefocus, l" + "$mod, l, movefocus, r" + "$mod, k, movefocus, u" + "$mod, j, movefocus, d" # special workspace - "$mod, o, togglespecialworkspace, magic" - "$mod SHIFT, o, movetoworkspace, special:magic" + "$mod, o, togglespecialworkspace, magic" + "$mod SHIFT, o, movetoworkspace, special:magic" # workspaces "$mod SHIFT, j, workspace, +1" @@ -159,18 +162,22 @@ in { "$mod SHIFT CTRL, k, movetoworkspace, -1" ] ++ ( # makes 1-10 workspace bindings - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - "$mod SHIFT CTRL, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" - ] - ) 10) + builtins.concatLists (builtins.genList + ( + x: + let + ws = + let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in + [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + "$mod SHIFT CTRL, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" + ] + ) 10) ); }; }; diff --git a/mod-hm/themes.nix b/mod-hm/themes.nix index 64fc425..105b859 100644 --- a/mod-hm/themes.nix +++ b/mod-hm/themes.nix @@ -6,7 +6,8 @@ colorScheme = lib.mkDefault inputs.nix-colors.colorSchemes.rose-pine-moon; home.packages = with pkgs; [ - (writeShellApplication { # credit: Janik-Haag + (writeShellApplication { + # credit: Janik-Haag name = "toggle-theme"; runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ]; text = '' @@ -23,21 +24,21 @@ }; gtk = { - enable = true; - cursorTheme = { - name = "Bibata_Ghost"; - package = pkgs.bibata-cursors-translucent; - size = config.flame.ui.cursorSize; - }; - iconTheme = { - name = config.gtk.theme.name; - package = pkgs.rose-pine-icon-theme; - }; - theme = { - name = lib.mkDefault "rose-pine-moon"; - package = pkgs.rose-pine-gtk-theme; - }; - }; + enable = true; + cursorTheme = { + name = "Bibata_Ghost"; + package = pkgs.bibata-cursors-translucent; + size = config.flame.ui.cursorSize; + }; + iconTheme = { + name = config.gtk.theme.name; + package = pkgs.rose-pine-icon-theme; + }; + theme = { + name = lib.mkDefault "rose-pine-moon"; + package = pkgs.rose-pine-gtk-theme; + }; + }; xdg.desktopEntries.theme-switch = { name = "Toggle theme"; @@ -46,22 +47,23 @@ }; specialisation.light.configuration = { - colorScheme = inputs.nix-colors.colorSchemes.rose-pine-dawn; + colorScheme = inputs.nix-colors.colorSchemes.rose-pine-dawn; gtk.theme.name = "rose-pine-dawn"; flame.hyprland.wallpaper = "lwp.png"; - programs.bash.shellAliases.snrbs = "sudo nixos-rebuild switch && toggle-theme"; + programs.bash.shellAliases.snrbs = "sudo nixos-rebuild switch && toggle-theme"; - home.packages = with pkgs; [ # credit: Janik-Haag - (hiPrio (writeShellApplication { - name = "toggle-theme"; - runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ]; - text = - '' - "$(home-manager generations | head -2 | tail -1 | rg -o '/[^ ]*')"/activate && hyprctl reload - ''; - })) - ]; - }; + home.packages = with pkgs; [ + # credit: Janik-Haag + (hiPrio (writeShellApplication { + name = "toggle-theme"; + runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ]; + text = + '' + "$(home-manager generations | head -2 | tail -1 | rg -o '/[^ ]*')"/activate && hyprctl reload + ''; + })) + ]; + }; }; -} \ No newline at end of file +} diff --git a/mod-hm/ui-apps.nix b/mod-hm/ui-apps.nix index e84509d..42f2e42 100644 --- a/mod-hm/ui-apps.nix +++ b/mod-hm/ui-apps.nix @@ -1,40 +1,40 @@ { config, pkgs, lib, ... }: { - imports = [ - ./firefox.nix - ./vscode.nix - ./themes.nix - ./vesktop.nix - ]; + imports = [ + ./firefox.nix + ./vscode.nix + ./themes.nix + ./vesktop.nix + ]; - options.flame.ui.cursorSize = lib.mkOption { - default = 24; - }; + options.flame.ui.cursorSize = lib.mkOption { + default = 24; + }; - config = { - home.packages = with pkgs; [ - nerdfonts - obsidian - vlc - libreoffice - hunspellDicts.en_US - godot_4 - bambu-studio - prismlauncher - gnome.file-roller - # fm # really good looking file manager, gonna wait until it's a bit better on the back end - pcmanfm - bottles - geeqie - ]; + config = { + home.packages = with pkgs; [ + nerdfonts + obsidian + vlc + libreoffice + hunspellDicts.en_US + godot_4 + bambu-studio + prismlauncher + gnome.file-roller + # fm # really good looking file manager, gonna wait until it's a bit better on the back end + pcmanfm + bottles + geeqie + ]; - programs = { - kitty = { - enable = true; - theme = config.colorScheme.name; - }; - }; + programs = { + kitty = { + enable = true; + theme = config.colorScheme.name; + }; + }; - xdg.desktopEntries = { + xdg.desktopEntries = { shutdown = { name = "Shutdown now"; exec = "shutdown now"; @@ -47,5 +47,5 @@ categories = [ "Utility" ]; }; }; - }; + }; } diff --git a/mod-hm/vesktop.nix b/mod-hm/vesktop.nix index 8be0c81..fc7fe9b 100644 --- a/mod-hm/vesktop.nix +++ b/mod-hm/vesktop.nix @@ -212,4 +212,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/mod-hm/waybar.nix b/mod-hm/waybar.nix index 7eb6a7a..c2802d4 100644 --- a/mod-hm/waybar.nix +++ b/mod-hm/waybar.nix @@ -1,4 +1,4 @@ -{ inputs, config, ... }: { +{ inputs, config, ... }: { config.programs.waybar = { enable = true; systemd.enable = true; @@ -8,7 +8,7 @@ position = "bottom"; spacing = 4; modules-left = [ - "hyprland/workspaces" + "hyprland/workspaces" "hyprland/window" ]; modules-right = [ @@ -31,11 +31,11 @@ temperature = { critical-threshold = 80; format = "{temperatureC}°C {icon}"; - format-icons = ["" "" ""]; + format-icons = [ "" "" "" ]; }; backlight = { format = "{percent}% {icon}"; - format-icons = ["" "" "" "" "" "" "" "" ""]; + format-icons = [ "" "" "" "" "" "" "" "" "" ]; }; battery = { states = { @@ -47,7 +47,7 @@ format-charging = "{capacity}% "; format-plugged = "{capacity}% "; format-alt = "{time} {icon}"; - format-icons = ["" "" "" "" ""]; + format-icons = [ "" "" "" "" "" ]; }; network = { format-wifi = "{essid} ({signalStrength}%) "; diff --git a/mod/av.nix b/mod/av.nix index 4416366..3e10009 100644 --- a/mod/av.nix +++ b/mod/av.nix @@ -4,4 +4,4 @@ scanner.enable = true; updater.enable = true; }; -} \ No newline at end of file +} diff --git a/mod/battery.nix b/mod/battery.nix index 031fa4d..51a46c6 100644 --- a/mod/battery.nix +++ b/mod/battery.nix @@ -1,14 +1,14 @@ { ... }: { - config = { - services.tlp = { - enable = true; - settings = { - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 0; - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - }; - }; - powerManagement.cpuFreqGovernor = "schedutil"; - }; + config = { + services.tlp = { + enable = true; + settings = { + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + }; + }; + powerManagement.cpuFreqGovernor = "schedutil"; + }; } diff --git a/mod/default.nix b/mod/default.nix index 0a5bc2f..67d40f2 100644 --- a/mod/default.nix +++ b/mod/default.nix @@ -35,7 +35,8 @@ experimental-features = [ "nix-command" "flakes" ]; trusted-users = [ "flame" ]; # should allow for remote builds }; - gc = { # garbage collection + gc = { + # garbage collection automatic = true; dates = "daily"; options = "--delete-older-than 7d"; diff --git a/mod/hyprland.nix b/mod/hyprland.nix index d6981c6..940a7dc 100644 --- a/mod/hyprland.nix +++ b/mod/hyprland.nix @@ -1,9 +1,9 @@ { ... }: { - config = { - programs.hyprland.enable = true; - security.pam.services.hyprlock = {}; - home-manager.users.flame.imports = [ - ../mod-hm/hyprland.nix - ]; - }; + config = { + programs.hyprland.enable = true; + security.pam.services.hyprlock = { }; + home-manager.users.flame.imports = [ + ../mod-hm/hyprland.nix + ]; + }; } diff --git a/mod/lanzaboote.nix b/mod/lanzaboote.nix index d6b8be1..dfee924 100644 --- a/mod/lanzaboote.nix +++ b/mod/lanzaboote.nix @@ -1,10 +1,10 @@ { inputs, ... }: { - imports = [ - inputs.lanzaboote.nixosModules.lanzaboote - ]; + imports = [ + inputs.lanzaboote.nixosModules.lanzaboote + ]; - config.boot.lanzaboote = { - enable = true; - pkiBundle = "/etc/secureboot"; - }; + config.boot.lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; } diff --git a/mod/laptop-server.nix b/mod/laptop-server.nix index 9cb9966..4ca7102 100644 --- a/mod/laptop-server.nix +++ b/mod/laptop-server.nix @@ -1,3 +1,3 @@ { ... }: { services.logind.lidSwitch = "ignore"; -} \ No newline at end of file +} diff --git a/mod/mc-server.nix b/mod/mc-server.nix index 706bfa2..81d4baf 100644 --- a/mod/mc-server.nix +++ b/mod/mc-server.nix @@ -1,98 +1,99 @@ { config, pkgs, lib, ... }: let - cfg = config.flame.mc-server; -in { - options.flame.mc-server = { - ram = lib.mkOption { - default = "14G"; - type = lib.types.str; - description = "RAM to allocate to Java"; - }; - }; + cfg = config.flame.mc-server; +in +{ + options.flame.mc-server = { + ram = lib.mkOption { + default = "14G"; + type = lib.types.str; + description = "RAM to allocate to Java"; + }; + }; - config = { - services.minecraft-server = { - enable = true; - eula = true; - package = pkgs.unstable.papermc; - jvmOpts = "-Xmx${cfg.ram} -Xms${cfg.ram} -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32"; - openFirewall = true; - declarative = true; - serverProperties = { - enable-jmx-monitoring = false; - gamemode = "survival"; - enable-command-block = false; - enable-query = false; - enforce-secure-profile = true; - level-name = "world"; - motd = "the place to be on a saturday"; - pvp = true; - generate-structures = true; - max-chained-neighbor-updates = 1000000; - difficulty = "hard"; - network-compression-threshold = 256; - max-tick-time = 60000; - require-resource-pack = false; - use-native-transport = true; - max-players = 20; - online-mode = true; - enable-status = true; - allow-flight = false; - broadcast-rcon-to-ops = true; - view-distance = 128; - allow-nether = true; - server-port = 25565; - enable-rcon = false; - sync-chunk-writes = true; - op-permission-level = 4; - prevent-proxy-connections = false; - hide-online-players = false; - entity-broadcast-range-percentage = 100; - simulation-distance = 10; - player-idle-timeout = 0; - force-gamemode = false; - rate-limit = 0; - hardcore = false; - white-list = true; - broadcast-console-to-ops = true; - spawn-npcs = true; - spawn-animals = true; - log-ips = true; - function-permission-level = 2; - initial-enabled-packs = "vanilla"; - level-type = "minecraft:normal"; - spawn-monsters = true; - enforce-whitelist = true; - spawn-protection = 0; - # max-world-size = 5000; - # server-ip = ; - # generator-settings = {}; - # query.port = 25565; - # initial-disabled-packs = ; - # resource-pack-prompt = ; - # resource-pack = ; - # rcon.password = ; - # text-filtering-config = ; - # resource-pack-sha1 = ; - # rcon.port = 25575; - # level-seed = ; - }; - whitelist = { - Flameopathic = "040ebdc7-9ca1-475d-9b3d-4fb62a29b19e"; - DerpLemonade = "b32f9046-264b-4e02-911c-90fbcbd167a7"; - nox_quack = "19051a2b-ac8e-4bab-86fd-e9ab42e8de3d"; - Mercadies = "c8200af1-7fb8-48fc-83b8-1066ef221333"; - LadyIanite07 = "aefc488b-ff80-4b4f-8b73-f8241e5df6d5"; - Psycho_Blade1 = "2a4d0a8f-d55c-4c83-9db5-a06665ad1231"; - StupidSufy = "b7248d94-9b5a-45b4-83b4-1f0d1f0d850b"; - ippon_datara = "96b3cf60-32f5-4cb5-9a38-43178c59aea3"; - vio_q = "861b6592-a1aa-4b63-bb9d-aac16637f30a"; - Attticusss = "af017840-c5a7-4615-af67-edc8f52c4deb"; - blood_ANDtendons = "0a66ec37-9a7b-4fe9-98e8-0107cd815cc4"; - NumberVoice7226 = "acd79e6b-ec94-478d-ad4b-d43d7b8f3ec6"; - Sephiatone = "7095eae3-c96c-42e3-9977-e1af8c3d51ff"; - }; - }; - }; + config = { + services.minecraft-server = { + enable = true; + eula = true; + package = pkgs.unstable.papermc; + jvmOpts = "-Xmx${cfg.ram} -Xms${cfg.ram} -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32"; + openFirewall = true; + declarative = true; + serverProperties = { + enable-jmx-monitoring = false; + gamemode = "survival"; + enable-command-block = false; + enable-query = false; + enforce-secure-profile = true; + level-name = "world"; + motd = "the place to be on a saturday"; + pvp = true; + generate-structures = true; + max-chained-neighbor-updates = 1000000; + difficulty = "hard"; + network-compression-threshold = 256; + max-tick-time = 60000; + require-resource-pack = false; + use-native-transport = true; + max-players = 20; + online-mode = true; + enable-status = true; + allow-flight = false; + broadcast-rcon-to-ops = true; + view-distance = 128; + allow-nether = true; + server-port = 25565; + enable-rcon = false; + sync-chunk-writes = true; + op-permission-level = 4; + prevent-proxy-connections = false; + hide-online-players = false; + entity-broadcast-range-percentage = 100; + simulation-distance = 10; + player-idle-timeout = 0; + force-gamemode = false; + rate-limit = 0; + hardcore = false; + white-list = true; + broadcast-console-to-ops = true; + spawn-npcs = true; + spawn-animals = true; + log-ips = true; + function-permission-level = 2; + initial-enabled-packs = "vanilla"; + level-type = "minecraft:normal"; + spawn-monsters = true; + enforce-whitelist = true; + spawn-protection = 0; + # max-world-size = 5000; + # server-ip = ; + # generator-settings = {}; + # query.port = 25565; + # initial-disabled-packs = ; + # resource-pack-prompt = ; + # resource-pack = ; + # rcon.password = ; + # text-filtering-config = ; + # resource-pack-sha1 = ; + # rcon.port = 25575; + # level-seed = ; + }; + whitelist = { + Flameopathic = "040ebdc7-9ca1-475d-9b3d-4fb62a29b19e"; + DerpLemonade = "b32f9046-264b-4e02-911c-90fbcbd167a7"; + nox_quack = "19051a2b-ac8e-4bab-86fd-e9ab42e8de3d"; + Mercadies = "c8200af1-7fb8-48fc-83b8-1066ef221333"; + LadyIanite07 = "aefc488b-ff80-4b4f-8b73-f8241e5df6d5"; + Psycho_Blade1 = "2a4d0a8f-d55c-4c83-9db5-a06665ad1231"; + StupidSufy = "b7248d94-9b5a-45b4-83b4-1f0d1f0d850b"; + ippon_datara = "96b3cf60-32f5-4cb5-9a38-43178c59aea3"; + vio_q = "861b6592-a1aa-4b63-bb9d-aac16637f30a"; + Attticusss = "af017840-c5a7-4615-af67-edc8f52c4deb"; + blood_ANDtendons = "0a66ec37-9a7b-4fe9-98e8-0107cd815cc4"; + NumberVoice7226 = "acd79e6b-ec94-478d-ad4b-d43d7b8f3ec6"; + Sephiatone = "7095eae3-c96c-42e3-9977-e1af8c3d51ff"; + }; + }; + }; } diff --git a/mod/mobile.nix b/mod/mobile.nix index 0667228..a2256a1 100644 --- a/mod/mobile.nix +++ b/mod/mobile.nix @@ -1,4 +1,4 @@ -{ ... }:{ +{ ... }: { imports = [ ./battery.nix ./suspend-then-hibernate.nix diff --git a/mod/nvidia.nix b/mod/nvidia.nix index 0130bc9..b9f6cdb 100644 --- a/mod/nvidia.nix +++ b/mod/nvidia.nix @@ -1,20 +1,20 @@ { config, pkgs, ... }: { - config = { - services.xserver.videoDrivers = [ "nvidia" ]; + config = { + services.xserver.videoDrivers = [ "nvidia" ]; - boot.kernelPackages = pkgs.unstable.linuxPackages; - - hardware = { - opengl = { - enable = true; - extraPackages = [ pkgs.glfw-wayland ]; - driSupport = true; - driSupport32Bit = true; - }; - nvidia = { - modesetting.enable = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; - }; - }; - }; + boot.kernelPackages = pkgs.unstable.linuxPackages; + + hardware = { + opengl = { + enable = true; + extraPackages = [ pkgs.glfw-wayland ]; + driSupport = true; + driSupport32Bit = true; + }; + nvidia = { + modesetting.enable = true; + package = config.boot.kernelPackages.nvidiaPackages.beta; + }; + }; + }; } diff --git a/mod/remote-builder.nix b/mod/remote-builder.nix index 4bb58d6..140ca98 100644 --- a/mod/remote-builder.nix +++ b/mod/remote-builder.nix @@ -1,3 +1,3 @@ -{ ... }: { - config.boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; +{ ... }: { + config.boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; } diff --git a/mod/rpi-boot.nix b/mod/rpi-boot.nix index 064c9cb..106a658 100644 --- a/mod/rpi-boot.nix +++ b/mod/rpi-boot.nix @@ -1,7 +1,8 @@ { config, pkgs, lib, ... }: let cfg = config.flame.rpi-boot; -in { +in +{ options.flame.rpi-boot.overclock = lib.mkEnableOption "overclock, set up for pi 4"; config = { @@ -9,10 +10,11 @@ in { boot.loader.generic-extlinux-compatible.enable = true; environment.systemPackages = [ pkgs.libraspberrypi ]; - boot.loader.raspberryPi.firmwareConfig = if cfg.overclock then '' - arm_freq=2000 - over_voltage=6 - gpu_freq=750 - '' else ""; + boot.loader.raspberryPi.firmwareConfig = + if cfg.overclock then '' + arm_freq=2000 + over_voltage=6 + gpu_freq=750 + '' else ""; }; } diff --git a/mod/ssh-server.nix b/mod/ssh-server.nix index 8947319..e88480f 100644 --- a/mod/ssh-server.nix +++ b/mod/ssh-server.nix @@ -1,34 +1,36 @@ { config, lib, ... }: let - cfg = config.flame.ssh-server; -in { - options.flame.ssh-server = { - openFirewall = lib.mkEnableOption "open firewall ports for remote ssh connection"; - pubKeys = lib.mkOption { - default = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC38crYgufmRowdoWdCfMZxF0uwl2xcFuNLjnN8tspUP flame" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILc5oDe4Uk3ZgEIENiQL7gZIv1FLFh37iPs9zxrrizfP flame" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINEGcYKPs7832AsYLoFTiG/T9GofZCR2Ry/JhcYA6QVJ flame" - ]; - }; - }; - - config = { - services = { - openssh = { - enable = true; - # best practice is to require public-key authentication - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - }; - }; - users.users = { - flame.openssh.authorizedKeys.keys = cfg.pubKeys; - root.openssh.authorizedKeys.keys = cfg.pubKeys; - }; - networking.firewall.allowedTCPPorts = if cfg.openFirewall then [ - 80 - 22 - ] else []; - }; + cfg = config.flame.ssh-server; +in +{ + options.flame.ssh-server = { + openFirewall = lib.mkEnableOption "open firewall ports for remote ssh connection"; + pubKeys = lib.mkOption { + default = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC38crYgufmRowdoWdCfMZxF0uwl2xcFuNLjnN8tspUP flame" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILc5oDe4Uk3ZgEIENiQL7gZIv1FLFh37iPs9zxrrizfP flame" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINEGcYKPs7832AsYLoFTiG/T9GofZCR2Ry/JhcYA6QVJ flame" + ]; + }; + }; + + config = { + services = { + openssh = { + enable = true; + # best practice is to require public-key authentication + settings.PasswordAuthentication = false; + settings.KbdInteractiveAuthentication = false; + }; + }; + users.users = { + flame.openssh.authorizedKeys.keys = cfg.pubKeys; + root.openssh.authorizedKeys.keys = cfg.pubKeys; + }; + networking.firewall.allowedTCPPorts = + if cfg.openFirewall then [ + 80 + 22 + ] else [ ]; + }; } diff --git a/mod/surface.nix b/mod/surface.nix index f12793a..3f7f9b1 100644 --- a/mod/surface.nix +++ b/mod/surface.nix @@ -1,6 +1,6 @@ { inputs, ... }: { - imports = [ - inputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel - ./mobile.nix - ]; + imports = [ + inputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel + ./mobile.nix + ]; } diff --git a/mod/suspend-then-hibernate.nix b/mod/suspend-then-hibernate.nix index cb6e198..891ab0f 100644 --- a/mod/suspend-then-hibernate.nix +++ b/mod/suspend-then-hibernate.nix @@ -5,7 +5,8 @@ let HIBERNATE_SECONDS = "1800"; HIBERNATE_LOCK = "/var/run/autohibernate.lock"; }; -in { +in +{ config = { systemd.services."awake-after-suspend-for-a-time" = { description = "Sets up the suspend so that it'll wake for hibernation only if not on AC power"; @@ -43,4 +44,4 @@ in { serviceConfig.Type = "simple"; }; }; -} \ No newline at end of file +} diff --git a/mod/syncthing.nix b/mod/syncthing.nix index 841134c..6b4294d 100644 --- a/mod/syncthing.nix +++ b/mod/syncthing.nix @@ -3,71 +3,72 @@ with lib; let - cfg = config.flame.syncthing; -in { - options.flame.syncthing = { - server = mkEnableOption "syncthing server (with open ports)"; - home = mkOption { - description = "home folder"; - default = "/home/flame"; - }; - devices = mkOption { - description = "devices to share all folders with"; - default = [ "fnix2" "surfnix" "servnix" ]; - }; - }; + cfg = config.flame.syncthing; +in +{ + options.flame.syncthing = { + server = mkEnableOption "syncthing server (with open ports)"; + home = mkOption { + description = "home folder"; + default = "/home/flame"; + }; + devices = mkOption { + description = "devices to share all folders with"; + default = [ "fnix2" "surfnix" "servnix" ]; + }; + }; - config.services.syncthing = { - enable = true; - openDefaultPorts = cfg.server; - user = mkDefault "flame"; - dataDir = mkDefault "${cfg.home}/syncthing"; - overrideDevices = mkDefault true; - overrideFolders = mkDefault true; - settings = { - devices = { - "fnix2" = { - id = "ONYBVSG-TRXS6VT-CXQ737X-CD4QQ5B-PQEJIC6-23CORFG-RA3MGDZ-X6YYBQP"; - }; - "surfnix" = { - id = "NJRGKSE-QTLVGI6-KUIMKVT-53GP7IN-6XUTFMZ-KKG76DZ-45Q6K2Q-P6AAIAB"; - }; - "servnix" = { - id = "DGMX5KZ-AUI3E4J-DHOPIFF-YRCOMWK-WZ6PUX3-2UHDTVH-RDTMFO3-ZP6M5QM"; - }; - }; - folders = { - doc = { - path = "${cfg.home}/doc"; - devices = cfg.devices; - id = "doc"; - versioning = { - type = "trashcan"; - params.cleanoutDays = "1000"; - }; - }; - pic = { - path = "${cfg.home}/pic"; - devices = cfg.devices; - id = "pic"; - versioning = { - type = "trashcan"; - params.cleanoutDays = "0"; # never clean out - prolly a bad idea, but the versioning system isn't hugely good anyway - }; - }; - prg = { - path = "${cfg.home}/prg"; - devices = cfg.devices; - id = "prg"; - versioning = { - type = "trashcan"; - params.cleanoutDays = "1000"; - }; - }; - }; - options = { - urAccepted = -1; - }; - }; - }; + config.services.syncthing = { + enable = true; + openDefaultPorts = cfg.server; + user = mkDefault "flame"; + dataDir = mkDefault "${cfg.home}/syncthing"; + overrideDevices = mkDefault true; + overrideFolders = mkDefault true; + settings = { + devices = { + "fnix2" = { + id = "ONYBVSG-TRXS6VT-CXQ737X-CD4QQ5B-PQEJIC6-23CORFG-RA3MGDZ-X6YYBQP"; + }; + "surfnix" = { + id = "NJRGKSE-QTLVGI6-KUIMKVT-53GP7IN-6XUTFMZ-KKG76DZ-45Q6K2Q-P6AAIAB"; + }; + "servnix" = { + id = "DGMX5KZ-AUI3E4J-DHOPIFF-YRCOMWK-WZ6PUX3-2UHDTVH-RDTMFO3-ZP6M5QM"; + }; + }; + folders = { + doc = { + path = "${cfg.home}/doc"; + devices = cfg.devices; + id = "doc"; + versioning = { + type = "trashcan"; + params.cleanoutDays = "1000"; + }; + }; + pic = { + path = "${cfg.home}/pic"; + devices = cfg.devices; + id = "pic"; + versioning = { + type = "trashcan"; + params.cleanoutDays = "0"; # never clean out - prolly a bad idea, but the versioning system isn't hugely good anyway + }; + }; + prg = { + path = "${cfg.home}/prg"; + devices = cfg.devices; + id = "prg"; + versioning = { + type = "trashcan"; + params.cleanoutDays = "1000"; + }; + }; + }; + options = { + urAccepted = -1; + }; + }; + }; } diff --git a/mod/terraria-server.nix b/mod/terraria-server.nix index 73584c3..39fd836 100644 --- a/mod/terraria-server.nix +++ b/mod/terraria-server.nix @@ -6,4 +6,4 @@ messageOfTheDay = "don't cause harm"; autoCreatedWorldSize = "large"; }; -} \ No newline at end of file +} diff --git a/mod/ui.nix b/mod/ui.nix index 12aa23e..39c7a65 100644 --- a/mod/ui.nix +++ b/mod/ui.nix @@ -11,7 +11,7 @@ }; services.printing.enable = true; - + security.rtkit.enable = true; # not entirely sure what this does, but the wiki said it was good services.pipewire = { enable = true; @@ -21,7 +21,7 @@ }; hardware.bluetooth.enable = true; - + # stuff to make hyprland happier environment.sessionVariables = { # makes cursor visible on nvidia - not necessarily necessary for others, testing necessary diff --git a/mod/unturned.nix b/mod/unturned.nix index d53d597..1f75ddc 100644 --- a/mod/unturned.nix +++ b/mod/unturned.nix @@ -1,3 +1,4 @@ -{ pkgs, ... }: { # basic utilities and configuration to set up an unturned server +{ pkgs, ... }: { + # basic utilities and configuration to set up an unturned server environment.systemPackages = [ pkgs.steam-run pkgs.steamcmd ]; -} \ No newline at end of file +} diff --git a/pkgs/wl-clicker/default.nix b/pkgs/wl-clicker/default.nix index e083f3d..4a70222 100644 --- a/pkgs/wl-clicker/default.nix +++ b/pkgs/wl-clicker/default.nix @@ -1,16 +1,16 @@ -{ lib, fetchFromGitHub, stdenv, wayland-scanner, wlr-protocols, wayland, ...}: +{ lib, fetchFromGitHub, stdenv, wayland-scanner, wlr-protocols, wayland, ... }: stdenv.mkDerivation (finalAttrs: { name = "wl-clicker"; version = "0.3.1"; - nativeBuildInputs = [wayland-scanner]; - buildInputs = [wlr-protocols wayland]; + nativeBuildInputs = [ wayland-scanner ]; + buildInputs = [ wlr-protocols wayland ]; src = fetchFromGitHub { owner = "phonetic112"; repo = "wl-clicker"; rev = "v${finalAttrs.version}"; - sha256= "0ddi383ilxqm0nvn05asn6m77sgi96fw07np95wx089a97b0mr8y"; + sha256 = "0ddi383ilxqm0nvn05asn6m77sgi96fw07np95wx089a97b0mr8y"; }; postPatch = '' @@ -25,4 +25,4 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; -}) \ No newline at end of file +})