diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -52,7 +52,7 @@ exec-once = wl-paste --type text --watch cliphist store #Stores only text data exec-once = wl-paste --type image --watch cliphist store #Stores only image data #exec-once = hyprpm reload -n #exec-once = hyprctl plugin load $(find /nix/store -maxdepth 1 -wholename "*-hyprsplit-$(hyprctl version -j | jq -r .version)" -print -quit)/lib/libhyprsplit.so -exec-once = hyprctl plugin load ${$LIB_HYPRSPLIT} +# exec-once = hyprctl plugin load ${$LIB_HYPRSPLIT} exec-once = ${$POLKIT_GNOME} #exec-once = gentoo-pipewire-launcher #exec-once = kwalletd5 & @@ -188,7 +188,7 @@ input { kb_layout = us, hu kb_variant = kb_model = - kb_options = grp:alt_space_toggle + kb_options = grp:alt_space_toggle kb_rules = follow_mouse = 1 @@ -201,9 +201,9 @@ } } # https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = false -} +# gestures { +# workspace_swipe = false +# } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more @@ -253,8 +253,11 @@ bind = $mainMod shift, right, movewindow, r bind = $mainMod shift, up, movewindow, u bind = $mainMod shift, down, movewindow, d -$workspacevar = split:workspace -$movetoworkspacevar = split:movetoworkspace +# $workspacevar = split:workspace +# $movetoworkspacevar = split:movetoworkspace + +$workspacevar = workspace +$movetoworkspacevar = movetoworkspace # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, $workspacevar, 1 diff --git a/nixos/flake.lock b/nixos/flake.lock --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -42,11 +42,11 @@ "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1757377667, - "narHash": "sha256-RR9KPGEKOzWtc3s9rjOAzn2GP6hgXcPlmbGNBw2MGcQ=", + "lastModified": 1759348172, + "narHash": "sha256-ZPUJX2ZA0ndcHndIA/S/nRESIJV0rifPr91SUpzJtEM=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "960a6988b572f2ed7ac453c43ae1fc4a05c297dd", + "rev": "dd1af56ad79c965ee20c236ba6adbb2135ac02af", "type": "github" }, "original": { @@ -134,11 +134,11 @@ "nixpkgs" ] }, "locked": { - "lastModified": 1757256385, - "narHash": "sha256-WK7tOhWwr15mipcckhDg2no/eSpM1nIh4C9le8HgHhk=", + "lastModified": 1759261733, + "narHash": "sha256-G104PUPKBgJmcu4NWs0LUaPpSOTD4jiq4mamLWu3Oc0=", "owner": "nix-community", "repo": "home-manager", - "rev": "f35703b412c67b48e97beb6e27a6ab96a084cd37", + "rev": "5a21f4819ee1be645f46d6b255d49f4271ef6723", "type": "github" }, "original": { @@ -154,11 +154,11 @@ "nixpkgs-unstable" ] }, "locked": { - "lastModified": 1757385184, - "narHash": "sha256-LCxtQn9ajvOgGRbQIRUJgfP7clMGGvV1SDW1HcSb0zk=", + "lastModified": 1759337100, + "narHash": "sha256-CcT3QvZ74NGfM+lSOILcCEeU+SnqXRvl1XCRHenZ0Us=", "owner": "nix-community", "repo": "home-manager", - "rev": "26993d87fd0d3b14f7667b74ad82235f120d986e", + "rev": "004753ae6b04c4b18aa07192c1106800aaacf6c3", "type": "github" }, "original": { @@ -234,11 +234,11 @@ "systems" ] }, "locked": { - "lastModified": 1756891319, - "narHash": "sha256-/e6OXxzbAj/o97Z1dZgHre4bNaVjapDGscAujSCQSbI=", + "lastModified": 1758192433, + "narHash": "sha256-CR6RnqEJSTiFgA6KQY4TTLUWbZ8RBnb+hxQqesuQNzQ=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "621e2e00f1736aa18c68f7dfbf2b9cff94b8cc4d", + "rev": "c44e749dd611521dee940d00f7c444ee0ae4cfb7", "type": "github" }, "original": { @@ -263,11 +263,11 @@ "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1757359491, - "narHash": "sha256-NT6lAoNk8iv5SVG0rUCAIJlPSIvoyogvnEUGSfeeZ6I=", + "lastModified": 1759399554, + "narHash": "sha256-FsFugHj7He5siEcmoRUdMKHB8uMzyneK/fynPS57W4E=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "1e3a06560fa6b2d906f8ecc9ec41b50e9b034cef", + "rev": "3bcfa94ee4189faaa4daf661949e88cf28c00d94", "type": "github" }, "original": { @@ -356,11 +356,11 @@ "systems" ] }, "locked": { - "lastModified": 1753819801, - "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", + "lastModified": 1757694755, + "narHash": "sha256-j+w5QUUr2QT/jkxgVKecGYV8J7fpzXCMgzEEr6LG9ug=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", + "rev": "5ffdfc13ed03df1dae5084468d935f0a3f2c9a4c", "type": "github" }, "original": { @@ -457,11 +457,11 @@ "nixpkgs" ] }, "locked": { - "lastModified": 1757230583, - "narHash": "sha256-4uqu7sFPOaVTCogsxaGMgbzZ2vK40GVGMfUmrvK3/LY=", + "lastModified": 1759217228, + "narHash": "sha256-P13ExJlhMVkrc5LxZLNkIJZhjNYo3LLXnxDsUNrdnMQ=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "fc3960e6c32c9d4f95fff2ef84444284d24d3bea", + "rev": "e52c15ab25f7dc68dde527c8df5bfa9d80d8e64f", "type": "github" }, "original": { @@ -521,11 +521,11 @@ "nixpkgs-unstable" ] }, "locked": { - "lastModified": 1757218147, - "narHash": "sha256-IwOwN70HvoBNB2ckaROxcaCvj5NudNc52taPsv5wtLk=", + "lastModified": 1759032422, + "narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "9b144dc3ef6e42b888c4190e02746aab13b0e97f", + "rev": "ec7a78cb0e098832d8acac091a4df393259c4839", "type": "github" }, "original": { @@ -536,11 +536,11 @@ } }, "nixpkgs": { "locked": { - "lastModified": 1757238739, - "narHash": "sha256-ovEq9v+Xc+oQH1zvQo28rT/YVqMQK2TRgUcNanvo2Zk=", + "lastModified": 1759147044, + "narHash": "sha256-3ZPFytJOcLjTChljeaGgoaNj+tOqzgEpqZAvRe3bU90=", "owner": "PedroHLC", "repo": "nixpkgs", - "rev": "6d8fca2c92488ff860524dd3400aa90a3310123e", + "rev": "18e83bbe13aa50992777832b52bd0e0d8585fb3b", "type": "github" }, "original": { @@ -552,11 +552,11 @@ } }, "nixpkgs-extra-unstable": { "locked": { - "lastModified": 1757034884, - "narHash": "sha256-PgLSZDBEWUHpfTRfFyklmiiLBE1i1aGCtz4eRA3POao=", + "lastModified": 1759386674, + "narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ca77296380960cd497a765102eeb1356eb80fed0", + "rev": "625ad6366178f03acd79f9e3822606dd7985b657", "type": "github" }, "original": { @@ -583,11 +583,11 @@ } }, "nixpkgs-stable": { "locked": { - "lastModified": 1757408970, - "narHash": "sha256-aSgK4BLNFFGvDTNKPeB28lVXYqVn8RdyXDNAvgGq+k0=", + "lastModified": 1759281824, + "narHash": "sha256-FIBE1qXv9TKvSNwst6FumyHwCRH3BlWDpfsnqRDCll0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d179d77c139e0a3f5c416477f7747e9d6b7ec315", + "rev": "5b5be50345d4113d04ba58c444348849f5585b4a", "type": "github" }, "original": { @@ -599,11 +599,11 @@ } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1757068644, - "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", "type": "github" }, "original": { @@ -615,11 +615,11 @@ } }, "nixpkgs_2": { "locked": { - "lastModified": 1757068644, - "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", + "lastModified": 1758198701, + "narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", + "rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d", "type": "github" }, "original": { @@ -670,11 +670,11 @@ "nixpkgs" ] }, "locked": { - "lastModified": 1757239681, - "narHash": "sha256-E9spYi9lxm2f1zWQLQ7xQt8Xs2nWgr1T4QM7ZjLFphM=", + "lastModified": 1758108966, + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "ab82ab08d6bf74085bd328de2a8722c12d97bd9d", + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", "type": "github" }, "original": { @@ -705,11 +705,11 @@ "nixpkgs" ] }, "locked": { - "lastModified": 1757298987, - "narHash": "sha256-yuFSw6fpfjPtVMmym51ozHYpJQ7SzVOTkk7tUv2JA0U=", + "lastModified": 1759286284, + "narHash": "sha256-JLdGGc4XDutzSD1L65Ni6Ye+oTm8kWfm0KTPMcyl7Y4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "cfd63776bde44438ff2936f0c9194c79dd407a5f", + "rev": "f6f2da475176bb7cff51faae8b3fe879cd393545", "type": "github" }, "original": { @@ -799,11 +799,11 @@ "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1757395105, - "narHash": "sha256-kwctEcCrHXZg80POmuOfqRqxSjy8bXhdBuNcRWaEpFA=", + "lastModified": 1759378939, + "narHash": "sha256-MWCIUqkxoMnvNYjooFiFHzlcZDBOp4DTXERe8xdEWoU=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "d7b87e67233fdb42e655600f3de4c2e8a13bc6a7", + "rev": "3ac78827a82614c394e6f8fcc84c5cea9c3847f4", "type": "github" }, "original": { diff --git a/nixos/flake.nix b/nixos/flake.nix --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -28,84 +28,54 @@ nix-index = { url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + + # modrinth-fix.url = "github:getchoo-contrib/nixpkgs/pkgs/modrinth-app/0.10.3"; }; outputs = { - self, - nixpkgs-stable, - nixpkgs-unstable, - home-manager, - zen-browser, - chaotic, - # fennec-flake, - zed-editor, - nixpkgs-extra-unstable, - lsfg-vk-flake, - nix-index, ... }@inputs: { - nixosConfigurations = { + nixosConfigurations = { Snowflake = - let - system = "x86_64-linux"; - - pkgs = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; - config.android_sdk.accept_license = true; - }; - - pkgs-unstable = import nixpkgs-unstable { - inherit system; - config = { - allowUnfree = true; - android_sdk.accept_license = true; - }; - }; - - pkgs-extra-unstable = import nixpkgs-extra-unstable { - inherit system; - config.allowUnfree = true; - }; - - in - nixpkgs-unstable.lib.nixosSystem { + let + system = "x86_64-linux"; + repos = import ./repos.nix { inherit inputs system; }; + in + # Set the default pkgs the system follows + repos.pkgs-system { inherit system; + # This makes these args available in all other modules specialArgs = { - inherit pkgs-unstable; - inherit pkgs-extra-unstable; + inherit inputs; }; modules = [ - - ( - { ... }: - { - nixpkgs.pkgs = import nixpkgs-unstable { - inherit system; - config.allowUnfree = true; - config.android_sdk.accept_license = true; - }; - } - ) + { + nixpkgs = { + inherit system; + config.allowUnfree = true; + config.android_sdk.accept_license = true; + }; + } ./system/configuration.nix # Main configuration ./system/networking.nix # Network config - chaotic.nixosModules.default - lsfg-vk-flake.nixosModules.default + inputs.chaotic.nixosModules.default + inputs.lsfg-vk-flake.nixosModules.default - home-manager.nixosModules.home-manager + inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { + inherit repos; + # inherit pkgs-modrinth-fix; inherit inputs; - inherit pkgs-extra-unstable; }; home-manager.users = { snowy = import ./home-manager/snowy.nix; @@ -113,7 +83,6 @@ }; } ]; }; - }; }; } diff --git a/nixos/home-manager/snowy.nix b/nixos/home-manager/snowy.nix --- a/nixos/home-manager/snowy.nix +++ b/nixos/home-manager/snowy.nix @@ -2,7 +2,8 @@ { inputs, pkgs, config, - pkgs-extra-unstable, + repos, + # pkgs-modrinth-fix, ... }: @@ -19,9 +20,11 @@ android-studio forgejo-actions-runner ctop inputs.zed-editor.packages."${pkgs.system}".zed-editor-bin + # pkgs-modrinth-fix.modrinth-app # zed stuffz ente-desktop bash-language-server + hyprls # shellcheck # for zed basher? # vscodium jetbrains.idea-ultimate @@ -32,7 +35,7 @@ unityhub fzf # for fish hextazy - pkgs-extra-unstable.grayjay + repos.pkgs-extra-unstable.grayjay # gaphor d-spy @@ -41,6 +44,7 @@ rustup gcc just + jujutsu # silly game clonehero @@ -61,14 +65,16 @@ heroic hydralauncher wineWowPackages.staging + + monocraft # wine64 - pkgs-extra-unstable.hyprlandPlugins.hyprsplit + # nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit ]; systemd.user.sessionVariables = { # Define some locations of some files, this seemed like the least wack way to do things. POLKIT_GNOME = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - LIB_HYPRSPLIT = "${pkgs-extra-unstable.hyprlandPlugins.hyprsplit}/lib/libhyprsplit.so"; + # LIB_HYPRSPLIT = "${nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit}/lib/libhyprsplit.so"; }; programs = { @@ -141,7 +147,7 @@ wayland.windowManager.hyprland = { enable = true; plugins = [ - pkgs-extra-unstable.hyprlandPlugins.hyprsplit + # inputs.nixpkgs-extra-unstable.hyprlandPlugins.hyprsplit ]; settings = { diff --git a/nixos/repos.nix b/nixos/repos.nix new file mode 100644 --- /dev/null +++ b/nixos/repos.nix @@ -0,0 +1,43 @@ +{ + inputs, + system, + ... +}: +let + inherit system; + + pkgs-extra-unstable = import inputs.nixpkgs-extra-unstable { + inherit system; + config.allowUnfree = true; + config.android_sdk.accept_license = true; + }; + + pks-unstable = import inputs.nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + config.android_sdk.accept_license = true; + }; + + pkgs-stable = import inputs.nixpkgs-stable { + inherit system; + config.allowUnfree = true; + config.android_sdk.accept_license = true; + }; + + pkgs-system = inputs.nixpkgs-unstable.lib.nixosSystem; + # { + # modules = [ + # { + # nixpkgs = { + # inherit system; + # config.allowUnfree = true; + # config.android_sdk.accept_license = true; + # }; + # } + # ]; + # }; + +in +{ + inherit pkgs-extra-unstable pks-unstable pkgs-stable pkgs-system; +} diff --git a/nixos/system/audio.nix b/nixos/system/audio.nix new file mode 100644 --- /dev/null +++ b/nixos/system/audio.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + # # In order to save the sound card state on shutdown + # hardware.alsa.enablePersistence = true; + + services = { + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + + wireplumber = { + enable = true; + extraConfig = { + "arctis-nova" = { + "monitor.alsa.rules" = [ + # { + # matches = [ + # { + # "device.name" = "alsa_card.usb-SteelSeries_Arctis_Nova_7-00"; + # } + # ]; + # actions = { + # update-props = { + # # "device.description" = "Puppy Headphones"; + + # }; + # }; + # } + { + matches = [ + { + "device.name" = "alsa_card.pci-0000_0f_00.4"; + } + ]; + actions = { + update-props = { + "device.description" = "Speakers"; + "audio.channels" = 6; + "audio.position" = "FL,FR,FC,LFE,RL,RR"; + }; + }; + } + ]; + }; + }; + }; + }; + }; +} diff --git a/nixos/system/configuration.nix b/nixos/system/configuration.nix --- a/nixos/system/configuration.nix +++ b/nixos/system/configuration.nix @@ -14,6 +14,7 @@ { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./audio.nix ]; # QUICKSHELl @@ -247,21 +248,14 @@ services = { udev = { enable = true; - extraRules = ""; + extraRules = '' + ENV{ID_VENDOR_ID}=="303a", ENV{ID_MODEL_ID}=="1001", MODE="0777" + ''; packages = [ pkgs.opentabletdriver ]; }; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - wireplumber.enable = true; - }; - greetd = { enable = true; settings = { @@ -400,6 +394,8 @@ #portalPackage = unstable.xdg-desktop-portal-hyprland; #package = unstable.hyprland; }; + niri.enable = true; + wireshark = { enable = true; dumpcap.enable = true; @@ -520,7 +516,7 @@ amdgpu_top mangohud mangojuice - rofi-wayland + rofi mako libnotify playerctl @@ -541,7 +537,7 @@ blueman # mpv pavucontrol - niri + # niri xwayland-satellite xdg-desktop-portal-gnome @@ -581,7 +577,7 @@ monero-gui p2pool #keyguard bitwarden-desktop - devenv + # devenv # heroic # stremio # grayjay diff --git a/server/containers/main.nix b/server/containers/main.nix new file mode 100644 --- /dev/null +++ b/server/containers/main.nix @@ -0,0 +1,11 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ + # ./nixos-mailserver.nix + ]; +} diff --git a/server/containers/nixos-mailserver.nix b/server/containers/nixos-mailserver.nix new file mode 100644 --- /dev/null +++ b/server/containers/nixos-mailserver.nix @@ -0,0 +1,55 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + release = "nixos-25.05"; + + # Import NixOS Mailserver module + mailserver = import ( + builtins.fetchTarball { + url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz"; + sha256 = "1qn5fg0h62r82q7xw54ib9wcpflakix2db2mahbicx540562la1y"; + # To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command: + # release="nixos-25.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack + } + ); +in +{ + containers.mailserver = { + autoStart = true; + privateNetwork = false; + + config = { + imports = [ mailserver ]; + + mailserver = { + enable = true; + # stateVersion = 3; + fqdn = "mail.mrsnowy.dev"; + domains = [ "mrsnowy.dev" ]; + + # A list of all login accounts. To create the password hashes, use + # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' + loginAccounts = { + "snow@mrsnowy.dev" = { + hashedPassword = "$2b$05$PXkzgulA1RTIYtwZVYcgpObsJNzhF0pSrPTnnY31Ba/7xPTZO54iy"; + # hashedPasswordFile = "/a/file/containing/a/hashed/password"; + aliases = [ "me@mrsnowy.dev" ]; + }; + # "user2@example.com" = { ... }; + }; + + # Use Let's Encrypt certificates. Note that this needs to set up a stripped + # down nginx and opens port 80. + certificateScheme = "acme-nginx"; + }; + + security.acme.acceptTerms = true; + security.acme.defaults.email = "security@example.com"; + }; + }; +} diff --git a/server/flake.nix b/server/flake.nix --- a/server/flake.nix +++ b/server/flake.nix @@ -34,6 +34,7 @@ }; modules = [ ./system/configuration.nix + ./containers/main.nix # "${nixpkgs}/nixos/modules/profiles/minimal.nix" # ./lxd-config.nix @@ -59,6 +60,7 @@ profiles.system = { sshUser = "snow"; # non-root user with access user = "root"; interacticeSudo = true; + remoteBuild = true; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.snow-den; }; }; diff --git a/server/home-manager/apps/fish.nix b/server/home-manager/apps/fish.nix --- a/server/home-manager/apps/fish.nix +++ b/server/home-manager/apps/fish.nix @@ -39,10 +39,8 @@ shellInit = '' if status is-interactive set -xg fish_color_command blue echo "Welcome to $(whoami)@$(hostname)!" - echo "---" - echo "Current generations:" - listgens echo "" + fastfetch end ''; diff --git a/server/system/configuration.nix b/server/system/configuration.nix --- a/server/system/configuration.nix +++ b/server/system/configuration.nix @@ -52,6 +52,7 @@ }; # Use grub so it works on both EFI and BOOT boot = { + enableContainers = true; # kernelPackages = pkgs.linuxKernel.packages.linux_hardened; kernelModules = [ # "overlay2"