diff --git a/README.md b/README.md index 9ea6276..81b5dae 100755 --- a/README.md +++ b/README.md @@ -62,6 +62,6 @@ This defines flake-based development environment templates for projects written This defines the core of the NixOS configuration using helper functions from `lib/`, which is organized as a flake-parts-based structure for better modularity: 1. `inputs`: Declares all external dependencies including, such as core Nix components (`nixpkgs`, `flake-parts`, `systems`) and user environment components (`home-manager`, `sops-nix`). -2. `outputs`: Uses flake-parts to organize system configurations for multiple machines (`mars`, `deimos`, `phobos` and `ceres`) and shared modules (`core`, `mantle`, `crust`) imported across systems. +2. `outputs`: Uses flake-parts to organize system configurations for multiple machines (`mars`, `venus`, `deimos`, `charon`, and `ceres`) and shared modules (`core`, `mantle`, `crust`) imported across systems. Each system imports specialized modules and user profiles based on its intended purpose and users, creating a flexible but consistent configuration framework across multiple machines. diff --git a/flake.nix b/flake.nix index 745401e..0db1854 100755 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,7 @@ ./systems/mars ./profiles/user0 ./profiles/user1 + ./profiles/user3 config.nixosModules.mars config.nixosModules.core config.nixosModules.mantle @@ -92,9 +93,22 @@ inputs.nur.modules.nixos.default inputs.sops-nix.nixosModules.sops ]; + venus = inputs.self.lib.mkLinuxSystem [ + ./systems/venus + ./profiles/user2 + config.nixosModules.venus + config.nixosModules.core + config.nixosModules.mantle + config.nixosModules.crust + inputs.home-manager.nixosModules.home-manager + inputs.lix-module.nixosModules.default + inputs.sops-nix.nixosModules.sops + ]; deimos = inputs.self.lib.mkLinuxSystem [ ./systems/deimos ./profiles/user0 + ./profiles/user1 + ./profiles/user2 config.nixosModules.deimos config.nixosModules.core config.nixosModules.mantle @@ -117,6 +131,15 @@ inputs.nur.modules.nixos.default inputs.sops-nix.nixosModules.sops ]; + charon = inputs.self.lib.mkLinuxSystem [ + ./systems/charon + ./profiles/user1 + config.nixosModules.charon + config.nixosModules.core + config.nixosModules.crust + inputs.home-manager.nixosModules.home-manager + inputs.lix-module.nixosModules.default + ]; ceres = inputs.self.lib.mkLinuxSystem [ ./systems/ceres ./profiles/user0 diff --git a/modules/config/default.nix b/modules/config/default.nix index adf4471..3570690 100755 --- a/modules/config/default.nix +++ b/modules/config/default.nix @@ -96,19 +96,19 @@ let themesSubmodule = lib.types.submodule { options = { - currentTheme = stringType; + currentTheme = genOptions stringType "theme"; windowManager = { gaps = intType; borders = intType; rounding = intType; }; fonts = { - name = stringType; + names = genOptions stringType "name"; sizes = { - applications = intType; - desktop = intType; - popups = intType; - terminal = intType; + applications = genOptions intType "size"; + desktop = genOptions intType "size"; + popups = genOptions intType "size"; + terminal = genOptions intType "size"; }; }; cursor = { diff --git a/modules/config/devices/config/charon.nix b/modules/config/devices/config/charon.nix new file mode 100755 index 0000000..ce4fd6b --- /dev/null +++ b/modules/config/devices/config/charon.nix @@ -0,0 +1,20 @@ +{ devicesFunctions }: +let + inherit (devicesFunctions) + ownerExclusiveReadWriteMask + charonIP + ; +in +{ + label = "Charon"; + name = "charon"; + sync = { + address0 = ""; + }; + ip = { + address0 = charonIP; + }; + boot = { + options = ownerExclusiveReadWriteMask; + }; +} diff --git a/modules/config/devices/config/phone.nix b/modules/config/devices/config/phone.nix index cf4684c..438398a 100755 --- a/modules/config/devices/config/phone.nix +++ b/modules/config/devices/config/phone.nix @@ -10,6 +10,7 @@ in label = dummy; sync = { address0 = "RMDKNJY-BTX6FYF-G6SR332-WS6HARI-PF74SC6-VPBSGRQ-MKVQZEQ-KSIB6QV"; # User0 + address1 = "RUKSHY4-UCBYRVG-CVYFCMU-M3NLA3Q-JINRF5V-YPR5W32-TEIBJN6-DNQRCAR"; # User2 }; ip = { address0 = phoneIP; diff --git a/modules/config/devices/config/synology.nix b/modules/config/devices/config/synology.nix index 6c6531a..b1f21b1 100755 --- a/modules/config/devices/config/synology.nix +++ b/modules/config/devices/config/synology.nix @@ -4,18 +4,23 @@ let sambaPermissions userIdForUser0 userIdForUser1 + userIdForUser3 synologyIP ; user0 = "nick"; - user1 = "streaming"; + user1 = "garnet"; + user3 = "streaming"; user0Name = "Nick"; + user1Name = "Garnet"; + user3Name = "Streaming"; synologyName = "synology"; in { label = "Synology"; sync = { address0 = "MWRGX2V-F5XKE5E-REP6ECT-OOPFBMF-22NHSMW-YFBU6MB-PLFUN63-R3MW2QX"; # User0 + address1 = ""; # User2 }; name = synologyName; ip = { @@ -27,10 +32,22 @@ in device = "//${synologyIP}/homes/${user0Name}"; options = sambaPermissions ++ userIdForUser0; }; - # Streaming Folder + # Garnet Home Folder folder1 = { mount = "/mnt/media/${synologyName}/${user1}"; - device = "//${synologyIP}/homes/${user0Name}"; + device = "//${synologyIP}/homes/${user1Name}"; options = sambaPermissions ++ userIdForUser1; }; + # Minecraft Worlds + folder2 = { + mount = "/home/${user1}/.local/share/PrismLauncher/instances/1.21/.minecraft/saves"; + device = "//${synologyIP}/homes/${user1Name}/Minecraft"; + options = sambaPermissions ++ userIdForUser1; + }; + # Streaming Folder + folder3 = { + mount = "/mnt/media/${synologyName}/${user3}"; + device = "//${synologyIP}/homes/${user0Name}"; + options = sambaPermissions ++ userIdForUser3; + }; } diff --git a/modules/config/devices/config/venus.nix b/modules/config/devices/config/venus.nix new file mode 100755 index 0000000..756476b --- /dev/null +++ b/modules/config/devices/config/venus.nix @@ -0,0 +1,33 @@ +{ devicesFunctions }: +let + inherit (devicesFunctions) + readWritePermissions + venusIP + ; + drivePath = "/run/media"; + byLabel = "/dev/disk/by-label"; + +in +{ + label = "Venus"; + name = "venus"; + ip = { + address0 = venusIP; + }; + boot = { + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; + storage0 = { + mount = "${drivePath}/games"; + device = "${byLabel}/Games"; + options = readWritePermissions; + }; + storage1 = { + mount = "${drivePath}/entertainment"; + device = "${byLabel}/Entertainment"; + options = readWritePermissions; + }; +} diff --git a/modules/config/devices/default.nix b/modules/config/devices/default.nix index b6222cd..ec9b76c 100755 --- a/modules/config/devices/default.nix +++ b/modules/config/devices/default.nix @@ -38,17 +38,22 @@ let "uid=1000" ]; userIdForUser1 = [ + "uid=1001" + ]; + userIdForUser3 = [ "uid=1002" ]; dummy = [ ]; ceresStorageDriveName = "NAS1"; ceresIP = "192.168.50.140"; + charonIP = "192.168.50.42"; deimosIP = "192.168.50.142"; marsIP = "192.168.50.218"; phoneIP = "192.168.50.243"; phobosIP = "192.168.50.180"; synologyIP = "192.168.50.210"; + venusIP = "192.168.58.104"; brotherIP = "192.168.50.195"; }; diff --git a/modules/config/themes/default.nix b/modules/config/themes/default.nix index 6620a8c..e0458c1 100755 --- a/modules/config/themes/default.nix +++ b/modules/config/themes/default.nix @@ -1,5 +1,7 @@ let - currentTheme0 = catppuccin-macchiato; + currentTheme0 = catppuccin-macchiato; # User0 Theme + currentTheme1 = catppuccin-mocha; # User1 Theme + currentTheme2 = catppuccin-mocha; # User2 Theme brogrammer = "brogrammer"; catppuccin-frappe = "catppuccin-frappe"; @@ -27,18 +29,42 @@ in borders = 3; rounding = 20; }; - currentTheme = currentTheme0; + currentTheme = { + theme0 = currentTheme0; # User0 Theme + theme1 = currentTheme1; # User1 Theme + theme2 = currentTheme2; # User2 Theme + }; cursor = { name = ""; size = 18; }; fonts = { - name = "MonaspiceRn Nerd Font"; + names = { + name0 = "MonaspiceRn Nerd Font"; # User0 Font + name1 = ""; # User1 Font + name2 = ""; # User2 Font + }; sizes = { - applications = 14; - desktop = 12; - popups = 10; - terminal = 10; + applications = { + size0 = 14; # User0 Size + size1 = 14; # User1 Size + size2 = 14; # User2 Size + }; + desktop = { + size0 = 12; # User0 Size + size1 = 12; # User1 Size + size2 = 12; # User2 Size + }; + popups = { + size0 = 10; # User0 Size + size1 = 10; # User1 Size + size2 = 10; # User2 Size + }; + terminal = { + size0 = 10; # User0 Size + size1 = 10; # User1 Size + size2 = 10; # User2 Size + }; }; }; palettes = @@ -65,6 +91,7 @@ in ${one-dark} = import (palettePath + onePath + /dark); ${one-light} = import (palettePath + onePath + /light); ${sparky} = import (palettePath + /sparky); + }; }; } diff --git a/modules/config/users/config/user1.nix b/modules/config/users/config/user1.nix index d9d5e68..c646b64 100755 --- a/modules/config/users/config/user1.nix +++ b/modules/config/users/config/user1.nix @@ -5,16 +5,11 @@ let ; in { - name = "Streaming"; - aliases = { - }; + name = "Garnet"; email = { - address0 = "nick@upRootNutrition.com"; + address0 = "ninaeffler@gmail.com"; }; paths = { path0 = "/home/${user1}/Files/Projects"; # Git path }; - sshKeys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop" - ]; } diff --git a/modules/config/users/config/user2.nix b/modules/config/users/config/user2.nix new file mode 100755 index 0000000..50145a2 --- /dev/null +++ b/modules/config/users/config/user2.nix @@ -0,0 +1,19 @@ +{ user2 }: +let + inherit + user2 + ; +in +{ + name = "Stacie"; + email = { + address0 = "staciesimonson@gmail.com"; + }; + paths = { + path0 = "/home/${user2}"; # Git path + }; + sshKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILQQDw0NigCC76G/GlHWIMunckaBmfgqbfJXFGWB+8fe stacie@desktop" + ]; + +} diff --git a/modules/config/users/config/user3.nix b/modules/config/users/config/user3.nix new file mode 100755 index 0000000..c3bba16 --- /dev/null +++ b/modules/config/users/config/user3.nix @@ -0,0 +1,20 @@ +{ user3 }: +let + inherit + user3 + ; +in +{ + name = "Streaming"; + aliases = { + }; + email = { + address0 = "nick@upRootNutrition.com"; + }; + paths = { + path0 = "/home/${user3}/Files/Projects"; # Git path + }; + sshKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBF9TmImDoYDpsW5VMFbOcuK3aH4TWRtx/xGxT3yUtEN nick@desktop" + ]; +} diff --git a/modules/config/users/default.nix b/modules/config/users/default.nix index 96bc7e2..60996ff 100755 --- a/modules/config/users/default.nix +++ b/modules/config/users/default.nix @@ -2,15 +2,21 @@ let configPath = ./config; user0 = "nick"; - user1 = "streaming"; + user1 = "garnet"; + user2 = "fallaryn"; + user3 = "streaming"; in { inherit user0 user1 + user2 + user3 ; users = { "${user0}" = import (configPath + /user0.nix) { inherit user0; }; "${user1}" = import (configPath + /user1.nix) { inherit user1; }; + "${user2}" = import (configPath + /user2.nix) { inherit user2; }; + "${user3}" = import (configPath + /user3.nix) { inherit user3; }; }; } diff --git a/modules/home/cli/files/yazi/default.nix b/modules/home/cli/files/yazi/default.nix index 3f3fd9e..fd7c888 100755 --- a/modules/home/cli/files/yazi/default.nix +++ b/modules/home/cli/files/yazi/default.nix @@ -1,3 +1,8 @@ +{ + flake, + pkgs, + ... +}: { programs.yazi = let diff --git a/modules/home/cli/shell/starship/config/settings.nix b/modules/home/cli/shell/starship/config/settings.nix index 1544e32..634e39f 100755 --- a/modules/home/cli/shell/starship/config/settings.nix +++ b/modules/home/cli/shell/starship/config/settings.nix @@ -7,11 +7,19 @@ let inherit (flake.config.aesthetics.themes) currentTheme palettes; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; diff --git a/modules/home/cli/utilities/bottom/config/settings.nix b/modules/home/cli/utilities/bottom/config/settings.nix index 7262e7b..0aa5968 100755 --- a/modules/home/cli/utilities/bottom/config/settings.nix +++ b/modules/home/cli/utilities/bottom/config/settings.nix @@ -9,11 +9,19 @@ let palettes ; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; in diff --git a/modules/home/default.nix b/modules/home/default.nix index fbd1c0a..5459fea 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -7,7 +7,9 @@ in flake.homeModules = let inherit (config.machines.devices) + charon mars + venus deimos ceres phobos @@ -15,6 +17,8 @@ in inherit (config.people) user0 user1 + user2 + user3 ; in { @@ -55,12 +59,13 @@ in systemMonitor usbImager virtManager + # polychromatic espanso claudeCode zoom academic hypr - niri + # niri wayland theming printManager @@ -72,6 +77,27 @@ in }; }; "${mars.name}-${user1}" = { + imports = builtins.attrValues { + inherit (modules) + cli + brave + ghostty + zed + gaming + spotify + docs + mpv + kolourPaint + discord + signal + scrcpy + bitwarden + emote + desktop + ; + }; + }; + "${mars.name}-${user3}" = { imports = builtins.attrValues { inherit (modules) cli @@ -97,6 +123,35 @@ in ; }; }; + "${venus.name}-${user2}" = { + imports = builtins.attrValues { + inherit (modules) + cli + firefox + brave + code + ghostty + gaming + spotify + audioProduction + wpsOffice + obsidian + okular + images + modeling + obsStudio + kdenlive + videoPlaying + discord + signal + tdesktop + teams + whatsApp + zoom + tools + ; + }; + }; "${deimos.name}-${user0}" = { imports = builtins.attrValues { inherit (modules) @@ -140,6 +195,7 @@ in niri wayland theming + # polychromatic dolphin espanso zotero @@ -148,6 +204,55 @@ in ; }; }; + "${deimos.name}-${user1}" = { + imports = builtins.attrValues { + inherit (modules) + cli + brave + ghostty + zed + gaming + spotify + docs + mpv + kolourPaint + discord + signal + scrcpy + bitwarden + emote + hypr + wayland + niri + theming + ; + }; + }; + "${deimos.name}-${user2}" = { + imports = builtins.attrValues { + inherit (modules) + cli + firefox + brave + code + ghostty + gaming + spotify + wpsOffice + obsidian + okular + images + videoPlaying + discord + signal + niri + hypr + wayland + theming + tools + ; + }; + }; "${phobos.name}-${user0}" = { imports = builtins.attrValues { inherit (modules) @@ -177,6 +282,30 @@ in ; }; }; + "${charon.name}-${user1}" = { + imports = builtins.attrValues { + inherit (modules) + cli + brave + ghostty + zed + gaming + spotify + docs + mpv + jellyfin + kolourPaint + systemMonitor + discord + signal + scrcpy + bitwarden + emote + gnome + theming + ; + }; + }; "${ceres.name}-${user0}" = { imports = builtins.attrValues { inherit (modules) diff --git a/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix b/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix index 4fabdbd..298c24e 100755 --- a/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix +++ b/modules/home/gui/apps/browsers/floorp/config/bookmarks/config/flake/selfHosted.nix @@ -28,6 +28,12 @@ let "chat" "ai" ]; + owncastTags = [ + instances.owncast.name + "own" + "cast" + "stream" + ]; syncthingTags = [ instances.syncthing.name "sync" diff --git a/modules/home/gui/apps/code/vsCode/config/userSettings.nix b/modules/home/gui/apps/code/vsCode/config/userSettings.nix index b62a4fe..402d08a 100755 --- a/modules/home/gui/apps/code/vsCode/config/userSettings.nix +++ b/modules/home/gui/apps/code/vsCode/config/userSettings.nix @@ -24,10 +24,10 @@ in "workbench.statusBar.visible" = false; "editor.multiCursorLimit" = 700000; "editor.wordWrap" = "on"; - "editor.fontSize" = fonts.sizes.applications; - "editor.fontFamily" = "'${fonts.name}', 'monospace', monospace"; - "terminal.integrated.fontSize" = fonts.sizes.applications; - "terminal.integrated.fontFamily" = "'${fonts.name}', 'monospace', monospace"; + "editor.fontSize" = fonts.sizes.applications.size0; + "editor.fontFamily" = "'${fonts.names.name0}', 'monospace', monospace"; + "terminal.integrated.fontSize" = fonts.sizes.applications.size0; + "terminal.integrated.fontFamily" = "'${fonts.names.name0}', 'monospace', monospace"; "editor.fontLigatures" = true; "elmLS.disableElmLSDiagnostics" = true; "elmLS.elmReviewDiagnostics" = "warning"; diff --git a/modules/home/gui/apps/code/zed/config/userSettings/config/interface/default.nix b/modules/home/gui/apps/code/zed/config/userSettings/config/interface/default.nix index f27c49c..f27a6a8 100755 --- a/modules/home/gui/apps/code/zed/config/userSettings/config/interface/default.nix +++ b/modules/home/gui/apps/code/zed/config/userSettings/config/interface/default.nix @@ -5,13 +5,13 @@ let ; in { - ui_font_family = fonts.name; - buffer_font_family = fonts.name; + ui_font_family = fonts.names.name0; + buffer_font_family = fonts.names.name0; hour_format = "hour12"; vim_mode = false; show_whitespaces = "none"; - ui_font_size = fonts.sizes.applications; - buffer_font_size = fonts.sizes.applications; + ui_font_size = fonts.sizes.applications.size0; + buffer_font_size = fonts.sizes.applications.size0; tab_size = 2; cursor_blink = true; theme = "Catppuccin Macchiato"; diff --git a/modules/home/gui/apps/code/zed/config/userSettings/config/terminal/default.nix b/modules/home/gui/apps/code/zed/config/userSettings/config/terminal/default.nix index acb72a7..d6204d0 100755 --- a/modules/home/gui/apps/code/zed/config/userSettings/config/terminal/default.nix +++ b/modules/home/gui/apps/code/zed/config/userSettings/config/terminal/default.nix @@ -25,9 +25,9 @@ in TERM = "ghostty"; }; - font_family = fonts.name; + font_family = fonts.names.name0; font_features = null; - font_size = fonts.sizes.terminal; + font_size = fonts.sizes.terminal.size0; line_height = "comfortable"; option_as_meta = false; button = false; diff --git a/modules/home/gui/apps/code/zed/config/userSettings/config/theme/default.nix b/modules/home/gui/apps/code/zed/config/userSettings/config/theme/default.nix new file mode 100755 index 0000000..5146900 --- /dev/null +++ b/modules/home/gui/apps/code/zed/config/userSettings/config/theme/default.nix @@ -0,0 +1,816 @@ +{ + config, + flake, + ... +}: +let + inherit (flake.config.aesthetics.themes) currentTheme palettes; + + inherit (flake.config.people) user0 user1 user2; + + user = config.home.username; + + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; + + el = palettes.${themeLogic}.colours; +in +{ + accents = [ + "${el.base0E}66" + "${el.base07}66" + "${el.base16}66" + "${el.base0B}66" + "${el.base0A}66" + "${el.base09}66" + "${el.base08}66" + ]; + + border = { + value = "#${el.base02}"; + variant = "#${el.base0E}"; + focused = "#${el.base07}"; + selected = "#${el.base0E}"; + transparent = "#${el.base0B}"; + disabled = "#${el.base03}"; + }; + + elevated_surface.background = "#${el.base01}"; + surface.background = "#${el.base01}"; + background = { + value = "#${el.base00}"; + appearance = "opaque"; + }; + element = { + background = "#${el.base11}"; + hover = "#${el.base03}4d"; + active = "#${el.base04}4d"; + selected = "#${el.base02}4d"; + disabled = "#${el.base03}"; + }; + + drop_target.background = "#${el.base02}66"; + ghost_element = { + background = "#${el.base11}59"; + hover = "#${el.base03}4d"; + active = "#${el.base04}99"; + selected = "#${el.base05}1a"; + disabled = "#${el.base03}"; + }; + + text = { + value = "#${el.base05}"; + muted = "#${el.base05}"; + placeholder = "#${el.base04}"; + disabled = "#${el.base03}"; + accent = "#${el.base0E}"; + }; + + icon = { + value = "#${el.base05}"; + muted = "#${el.base04}"; + disabled = "#${el.base03}"; + placeholder = "#${el.base04}"; + accent = "#${el.base0E}"; + }; + + status_bar.background = "#${el.base11}"; + title_bar = { + background = "#${el.base11}"; + inactive_background = "#${el.base11}d9"; + }; + toolbar.background = "#${el.base00}"; + tab_bar.background = "#${el.base11}"; + tab = { + inactive_background = "#${el.base11}"; + active_background = "#${el.base00}"; + }; + + search.match_background = "#${el.base0C}33"; + panel = { + background = "#${el.base01}"; + focused_border = "#${el.base05}"; + indent_guide = "#${el.base02}99"; + indent_guide_active = "#${el.base04}"; + indent_guide_hover = "#${el.base0E}"; + }; + + pane.focused_border = "#${el.base05}"; + pane_group.border = "#${el.base02}"; + + scrollbar = { + thumb = { + background = "#${el.base0E}33"; + hover_background = "#${el.base03}"; + border = "#${el.base0E}"; + scrollbar.track.background = null; + }; + track.border = "#${el.base05}12"; + }; + + editor = { + foreground = "#${el.base05}"; + background = "#${el.base00}"; + gutter.background = "#${el.base00}"; + subheader.background = "#${el.base01}"; + active_line.background = "#${el.base05}0d"; + highlighted_line.background = null; + line_number = "#${el.base04}"; + active_line_number = "#${el.base0E}"; + invisible = "#${el.base05}66"; + wrap_guide = "#${el.base04}"; + active_wrap_guide = "#${el.base04}"; + document_highlight = { + bracket_background = "#${el.base06}40"; + read_background = "#${el.base05}29"; + write_background = "#${el.base05}29"; + }; + indent_guide = "#${el.base02}99"; + indent_guide_active = "#${el.base04}"; + }; + + terminal = { + background = "#${el.base00}"; + ansi.background = "#${el.base00}"; + foreground = "#${el.base05}"; + dim_foreground = "#${el.base04}"; + bright_foreground = "#${el.base05}"; + }; + + link_text.hover = "#${el.base15}"; + + conflict = { + value = "#${el.base0A}"; + border = "#${el.base0A}"; + background = "#${el.base01}"; + }; + + created = { + value = "#${el.base0B}"; + border = "#${el.base0B}"; + background = "#${el.base01}"; + }; + + deleted = { + value = "#${el.base08}"; + border = "#${el.base08}"; + background = "#${el.base01}"; + }; + + hidden = { + value = "#${el.base03}"; + border = "#${el.base03}"; + background = "#${el.base01}"; + }; + + hint = { + value = "#${el.base04}"; + border = "#${el.base04}"; + background = "#${el.base01}"; + }; + + ignored = { + value = "#${el.base03}"; + border = "#${el.base03}"; + background = "#${el.base01}"; + }; + + modified = { + value = "#${el.base0A}"; + border = "#${el.base0A}"; + background = "#${el.base01}"; + }; + + predictive = { + value = "#${el.base03}"; + border = "#${el.base07}"; + background = "#${el.base01}"; + }; + + renamed = { + value = "#${el.base16}"; + border = "#${el.base16}"; + background = "#${el.base01}"; + }; + + info = { + value = "#${el.base0C}"; + border = "#${el.base0C}"; + background = "#${el.base05}33"; + }; + + warning = { + value = "#${el.base0A}"; + border = "#${el.base0A}"; + background = "#${el.base0A}1f"; + }; + + error = { + value = "#${el.base08}"; + border = "#${el.base08}"; + background = "#${el.base08}1f"; + }; + + success = { + value = "#${el.base0B}"; + border = "#${el.base0B}"; + background = "#${el.base0B}1f"; + }; + + unreachable = { + value = "#${el.base08}"; + border = "#${el.base08}"; + background = "#${el.base08}1f"; + }; + + players = [ + { + cursor = "#${el.base06}"; + selection = "#${el.base04}80"; + background = "#${el.base06}"; + } + { + cursor = "#${el.base0E}"; + selection = "#${el.base0E}33"; + background = "#${el.base0E}"; + } + { + cursor = "#${el.base07}"; + selection = "#${el.base07}33"; + background = "#${el.base07}"; + } + { + cursor = "#${el.base16}"; + selection = "#${el.base16}33"; + background = "#${el.base16}"; + } + { + cursor = "#${el.base0B}"; + selection = "#${el.base0B}33"; + background = "#${el.base0B}"; + } + { + cursor = "#${el.base0A}"; + selection = "#${el.base0A}33"; + background = "#${el.base0A}"; + } + { + cursor = "#${el.base09}"; + selection = "#${el.base09}33"; + background = "#${el.base09}"; + } + { + cursor = "#${el.base08}"; + selection = "#${el.base08}33"; + background = "#${el.base08}"; + } + ]; + + syntax = { + variable = { + color = "#${el.base05}"; + font_style = null; + font_weight = null; + }; + variable.builtin = { + color = "#${el.base08}"; + font_style = null; + font_weight = null; + }; + variable.parameter = { + color = "#${el.base12}"; + font_style = null; + font_weight = null; + }; + variable.member = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + variable.special = { + color = "#${el.base17}"; + font_style = "italic"; + font_weight = null; + }; + + constant = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + constant.builtin = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + constant.macro = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + + module = { + color = "#${el.base0A}"; + font_style = "italic"; + font_weight = null; + }; + + label = { + color = "#${el.base16}"; + font_style = null; + font_weight = null; + }; + + string = { + color = "#${el.base0B}"; + font_style = null; + font_weight = null; + }; + string.documentation = { + color = "#${el.base0C}"; + font_style = null; + font_weight = null; + }; + string.regexp = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + string.escape = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + string.special = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + string.special.path = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + string.special.symbol = { + color = "#${el.base0F}"; + font_style = null; + font_weight = null; + }; + string.special.url = { + color = "#${el.base06}"; + font_style = "italic"; + font_weight = null; + }; + + character = { + color = "#${el.base0C}"; + font_style = null; + font_weight = null; + }; + character.special = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + + boolean = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + number = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + number.float = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + type = { + color = "#${el.base0A}"; + font_style = null; + font_weight = null; + }; + type.builtin = { + color = "#${el.base0E}"; + font_style = "italic"; + font_weight = null; + }; + type.definition = { + color = "#${el.base0A}"; + font_style = null; + font_weight = null; + }; + type.interface = { + color = "#${el.base0A}"; + font_style = "italic"; + font_weight = null; + }; + type.super = { + color = "#${el.base0A}"; + font_style = "italic"; + font_weight = null; + }; + + attribute = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + property = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + + function = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + function.builtin = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + function.call = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + function.macro = { + color = "#${el.base0C}"; + font_style = null; + font_weight = null; + }; + function.method = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + function.method.call = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + constructor = { + color = "#${el.base0F}"; + font_style = null; + font_weight = null; + }; + + operator = { + color = "#${el.base15}"; + font_style = null; + font_weight = null; + }; + + keyword = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.modifier = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.type = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.coroutine = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.function = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.operator = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.import = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.repeat = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.return = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.debug = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.exception = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.conditional = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.conditional.ternary = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + keyword.directive = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + keyword.directive.define = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + keyword.export = { + color = "#${el.base15}"; + font_style = null; + font_weight = null; + }; + + punctuation = { + color = "#${el.base05}"; + font_style = null; + font_weight = null; + }; + punctuation.delimiter = { + color = "#${el.base05}"; + font_style = null; + font_weight = null; + }; + punctuation.bracket = { + color = "#${el.base05}"; + font_style = null; + font_weight = null; + }; + punctuation.special = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + punctuation.special.symbol = { + color = "#${el.base0F}"; + font_style = null; + font_weight = null; + }; + punctuation.list_marker = { + color = "#${el.base0C}"; + font_style = null; + font_weight = null; + }; + + comment = { + color = "#${el.base05}"; + font_style = "italic"; + font_weight = null; + }; + comment.doc = { + color = "#${el.base05}"; + font_style = "italic"; + font_weight = null; + }; + comment.documentation = { + color = "#${el.base05}"; + font_style = "italic"; + font_weight = null; + }; + comment.error = { + color = "#${el.base08}"; + font_style = "italic"; + font_weight = null; + }; + comment.warning = { + color = "#${el.base0A}"; + font_style = "italic"; + font_weight = null; + }; + comment.hint = { + color = "#${el.base0D}"; + font_style = "italic"; + font_weight = null; + }; + comment.todo = { + color = "#${el.base0F}"; + font_style = "italic"; + font_weight = null; + }; + comment.note = { + color = "#${el.base06}"; + font_style = "italic"; + font_weight = null; + }; + + diff.plus = { + color = "#${el.base0B}"; + font_style = null; + font_weight = null; + }; + diff.minus = { + color = "#${el.base08}"; + font_style = null; + font_weight = null; + }; + tag = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + tag.attribute = { + color = "#${el.base0A}"; + font_style = "italic"; + font_weight = null; + }; + tag.delimiter = { + color = "#${el.base0C}"; + font_style = null; + font_weight = null; + }; + + parameter = { + color = "#${el.base12}"; + font_style = null; + font_weight = null; + }; + + field = { + color = "#${el.base07}"; + font_style = null; + font_weight = null; + }; + + namespace = { + color = "#${el.base0A}"; + font_style = "italic"; + font_weight = null; + }; + + float = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + symbol = { + color = "#${el.base17}"; + font_style = null; + font_weight = null; + }; + + string.regex = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + text = { + color = "#${el.base05}"; + font_style = null; + font_weight = null; + }; + + emphasis.strong = { + color = "#${el.base12}"; + font_style = null; + font_weight = 700; + }; + + emphasis = { + color = "#${el.base12}"; + font_style = "italic"; + font_weight = null; + }; + + embedded = { + color = "#${el.base12}"; + font_style = null; + font_weight = null; + }; + + text.literal = { + color = "#${el.base0B}"; + font_style = null; + font_weight = null; + }; + + concept = { + color = "#${el.base16}"; + font_style = null; + font_weight = null; + }; + + enum = { + color = "#${el.base0C}"; + font_style = null; + font_weight = 700; + }; + + function.decorator = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + type.class.definition = { + color = "#${el.base0A}"; + font_style = null; + font_weight = 700; + }; + + hint = { + color = "#${el.base04}"; + font_style = "italic"; + font_weight = null; + }; + + link_text = { + color = "#${el.base0D}"; + font_style = null; + font_weight = null; + }; + + link_uri = { + color = "#${el.base06}"; + font_style = "italic"; + font_weight = null; + }; + + parent = { + color = "#${el.base09}"; + font_style = null; + font_weight = null; + }; + + predictive = { + color = "#${el.base03}"; + font_style = null; + font_weight = null; + }; + + predoc = { + color = "#${el.base08}"; + font_style = null; + font_weight = null; + }; + + primary = { + color = "#${el.base12}"; + font_style = null; + font_weight = null; + }; + + tag.doctype = { + color = "#${el.base0E}"; + font_style = null; + font_weight = null; + }; + + string.doc = { + color = "#${el.base0C}"; + font_style = "italic"; + font_weight = null; + }; + + title = { + color = "#${el.base05}"; + font_style = null; + font_weight = 800; + }; + + variant = { + color = "#${el.base08}"; + font_style = null; + font_weight = null; + }; + }; + +} diff --git a/modules/home/gui/apps/code/zed/config/userSettings/default.nix b/modules/home/gui/apps/code/zed/config/userSettings/default.nix index 7494f49..8dd5b6f 100755 --- a/modules/home/gui/apps/code/zed/config/userSettings/default.nix +++ b/modules/home/gui/apps/code/zed/config/userSettings/default.nix @@ -11,6 +11,7 @@ let languagesPath = import (configPath + /languages); lspPath = import (configPath + /lsp); terminalPath = import (configPath + /terminal) { inherit flake; }; + # experimentalPath = import (configPath + /theme) { inherit config flake; }; gitPath = import (configPath + /git); miscPath = import (configPath + /misc) { inherit lib pkgs; }; in @@ -19,6 +20,7 @@ in languages = languagesPath; lsp = lspPath; terminal = terminalPath; + # experimental.theme_overrides = experimentalPath; } // assistantPath diff --git a/modules/home/gui/apps/code/zed/default.nix b/modules/home/gui/apps/code/zed/default.nix index 2bb79f5..7d2d81f 100755 --- a/modules/home/gui/apps/code/zed/default.nix +++ b/modules/home/gui/apps/code/zed/default.nix @@ -18,7 +18,7 @@ let ; }; extraPackagesPath = import (configPath + /extraPackages) { inherit pkgs; }; - # packagePath = flake.inputs.zed-editor.packages.${pkgs.system}.default; + packagePath = flake.inputs.zed-editor.packages.${pkgs.system}.default; in { programs.zed-editor = { diff --git a/modules/home/gui/apps/emulators/ghostty/config/settings.nix b/modules/home/gui/apps/emulators/ghostty/config/settings.nix index baabc24..ff9320a 100755 --- a/modules/home/gui/apps/emulators/ghostty/config/settings.nix +++ b/modules/home/gui/apps/emulators/ghostty/config/settings.nix @@ -1,5 +1,6 @@ { flake, + osConfig, pkgs, ... }: @@ -9,8 +10,8 @@ in { confirm-close-surface = false; window-decoration = true; - font-size = fonts.sizes.terminal; - font-family = fonts.name; + font-size = fonts.sizes.terminal.size0; + font-family = fonts.names.name0; window-padding-x = 10; window-padding-y = 10; copy-on-select = true; diff --git a/modules/home/gui/apps/emulators/ghostty/config/themes.nix b/modules/home/gui/apps/emulators/ghostty/config/themes.nix index 44cd63f..7ca8f5d 100755 --- a/modules/home/gui/apps/emulators/ghostty/config/themes.nix +++ b/modules/home/gui/apps/emulators/ghostty/config/themes.nix @@ -6,11 +6,19 @@ let inherit (flake.config.aesthetics.themes) currentTheme palettes; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; in diff --git a/modules/home/gui/apps/emulators/kitty/default.nix b/modules/home/gui/apps/emulators/kitty/default.nix index 791a7ec..9d9f3b8 100755 --- a/modules/home/gui/apps/emulators/kitty/default.nix +++ b/modules/home/gui/apps/emulators/kitty/default.nix @@ -11,8 +11,8 @@ in programs.kitty = { enable = true; font = { - name = fonts.name; - size = fonts.sizes.terminal; + name = fonts.names.name0; + size = fonts.sizes.terminal.size0; }; themeFile = "Catppuccin-Macchiato"; }; diff --git a/modules/home/gui/apps/emulators/wezterm/config/extraConfig.nix b/modules/home/gui/apps/emulators/wezterm/config/extraConfig.nix index 8fd2a75..2651819 100755 --- a/modules/home/gui/apps/emulators/wezterm/config/extraConfig.nix +++ b/modules/home/gui/apps/emulators/wezterm/config/extraConfig.nix @@ -7,8 +7,8 @@ in '' return { color_scheme = "Catppuccin Macchiato", - font_size = ${builtins.toString fonts.sizes.terminal}, - font = wezterm.font('${fonts.name}'), + font_size = ${builtins.toString fonts.sizes.terminal.size0}, + font = wezterm.font('${fonts.names.name0}'), enable_tab_bar = false, window_close_confirmation = 'NeverPrompt', term = 'wezterm', diff --git a/modules/home/gui/apps/tools/flameshot/default.nix b/modules/home/gui/apps/tools/flameshot/default.nix index a00684e..0761a97 100755 --- a/modules/home/gui/apps/tools/flameshot/default.nix +++ b/modules/home/gui/apps/tools/flameshot/default.nix @@ -28,8 +28,8 @@ in }; }; home.packages = builtins.attrValues { - # inherit (pkgs) - # # flameshot - # ; + inherit (pkgs) + # flameshot + ; }; } diff --git a/modules/home/gui/desktop/hypr/land/config/general.nix b/modules/home/gui/desktop/hypr/land/config/general.nix index 985b170..68bfe76 100755 --- a/modules/home/gui/desktop/hypr/land/config/general.nix +++ b/modules/home/gui/desktop/hypr/land/config/general.nix @@ -11,11 +11,19 @@ let windowManager ; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; in diff --git a/modules/home/gui/desktop/niri/config/binds.nix b/modules/home/gui/desktop/niri/config/binds.nix index 7022817..9584bff 100755 --- a/modules/home/gui/desktop/niri/config/binds.nix +++ b/modules/home/gui/desktop/niri/config/binds.nix @@ -2,6 +2,7 @@ config, flake, osConfig, + workspaceStrings, ... }: let diff --git a/modules/home/gui/desktop/niri/default.nix b/modules/home/gui/desktop/niri/default.nix index c9e4b8d..06249b2 100755 --- a/modules/home/gui/desktop/niri/default.nix +++ b/modules/home/gui/desktop/niri/default.nix @@ -10,12 +10,20 @@ let inherit (flake.config.aesthetics.themes) currentTheme palettes; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; colourHelpers = { - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${colourHelpers.themeLogic}.colours; diff --git a/modules/home/gui/desktop/river/default.nix b/modules/home/gui/desktop/river/default.nix index b881b13..5746df6 100755 --- a/modules/home/gui/desktop/river/default.nix +++ b/modules/home/gui/desktop/river/default.nix @@ -5,6 +5,7 @@ ... }: let + inherit (flake.config.aesthetics.themes) cursor; configPath = ./config; settingsPath = { spawn = import (configPath + /spawn.nix) { inherit config flake; }; diff --git a/modules/home/gui/desktop/wayland/dunst/config/settings.nix b/modules/home/gui/desktop/wayland/dunst/config/settings.nix index 6d59f35..bed0f5e 100755 --- a/modules/home/gui/desktop/wayland/dunst/config/settings.nix +++ b/modules/home/gui/desktop/wayland/dunst/config/settings.nix @@ -11,11 +11,19 @@ let fonts ; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; @@ -23,7 +31,7 @@ let in { global = { - font = "${fonts.name} ${builtins.toString fonts.sizes.popups}"; + font = "${fonts.names.name0} ${builtins.toString fonts.sizes.popups.size0}"; background = makeColor el.base01; frame_color = makeColor el.base0E; foreground = makeColor el.base05; diff --git a/modules/home/gui/desktop/wayland/fuzzel/default.nix b/modules/home/gui/desktop/wayland/fuzzel/default.nix index 80bbf21..87be24e 100755 --- a/modules/home/gui/desktop/wayland/fuzzel/default.nix +++ b/modules/home/gui/desktop/wayland/fuzzel/default.nix @@ -8,11 +8,19 @@ let inherit (flake.config.aesthetics.themes) currentTheme palettes fonts; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; @@ -27,7 +35,7 @@ in dpi-aware = "no"; icon-theme = "Papirus-Dark"; width = 25; - font = "${fonts.name}:weight=bold:size=${toString fonts.sizes.popups}"; + font = "${fonts.names.name0}:weight=bold:size=${toString fonts.sizes.desktop.size0}"; terminal = "${pkgs.ghostty}/bin/ghostty"; layer = "overlay"; fields = "name"; diff --git a/modules/home/gui/desktop/wayland/swaylock/config/settings.nix b/modules/home/gui/desktop/wayland/swaylock/config/settings.nix index e96d4e5..639a8c0 100755 --- a/modules/home/gui/desktop/wayland/swaylock/config/settings.nix +++ b/modules/home/gui/desktop/wayland/swaylock/config/settings.nix @@ -10,17 +10,25 @@ let fonts ; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; in { - font = fonts.name; - font-size = fonts.sizes.popups; + font = fonts.names.name0; + font-size = fonts.sizes.desktop.size0; indicator-idle-visible = true; indicator-radius = 100; indicator-thickness = 20; diff --git a/modules/home/gui/desktop/wayland/waybar/config/style.nix b/modules/home/gui/desktop/wayland/waybar/config/style.nix index 997bb77..f222e21 100755 --- a/modules/home/gui/desktop/wayland/waybar/config/style.nix +++ b/modules/home/gui/desktop/wayland/waybar/config/style.nix @@ -12,17 +12,25 @@ let windowManager ; - inherit (flake.config.people) user0; + inherit (flake.config.people) user0 user1 user2; user = config.home.username; - themeLogic = if user == user0 then currentTheme else currentTheme; + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; el = palettes.${themeLogic}.colours; custom = { - font = fonts.name; - font_size = fonts.sizes.popups; + font = fonts.names.name0; + font_size = fonts.sizes.desktop.size0; font_weight = "bold"; opacityBg = "0.90"; opacityBt = "1"; diff --git a/modules/nixos/core/doas/default.nix b/modules/nixos/core/doas/default.nix index 37fd07b..bcfb6aa 100755 --- a/modules/nixos/core/doas/default.nix +++ b/modules/nixos/core/doas/default.nix @@ -1,9 +1,44 @@ -{ flake, ... }: +{ + flake, + config, + ... +}: let inherit (flake.config.people) user0 user1 + user2 + user3 ; + inherit (flake.config.machines) + devices + ; + hostname = config.networking.hostName; + mars = devices.mars.name; + ceres = devices.ceres.name; + venus = devices.venus.name; + charon = devices.charon.name; + deimos = devices.deimos.name; + + userLogic = + if + builtins.elem hostname [ + mars + deimos + ceres + ] + then + [ + user0 + user1 + user3 + ] + else if hostname == charon then + [ user1 ] + else if hostname == venus then + [ user2 ] + else + [ ]; in { security = { @@ -13,10 +48,7 @@ in { keepEnv = true; noPass = true; - users = [ - user0 - user1 - ]; + users = userLogic; } ]; }; diff --git a/modules/nixos/core/environment/default.nix b/modules/nixos/core/environment/default.nix index a4bfb16..40ec512 100755 --- a/modules/nixos/core/environment/default.nix +++ b/modules/nixos/core/environment/default.nix @@ -1,4 +1,8 @@ -{ pkgs, ... }: +{ + pkgs, + config, + ... +}: { environment = { enableAllTerminfo = true; diff --git a/modules/nixos/core/fonts/default.nix b/modules/nixos/core/fonts/default.nix index fdeeb36..c1ef38b 100755 --- a/modules/nixos/core/fonts/default.nix +++ b/modules/nixos/core/fonts/default.nix @@ -14,13 +14,13 @@ in enable = true; defaultFonts = { serif = [ - fonts.name + fonts.names.name0 ]; monospace = [ - fonts.name + fonts.names.name0 ]; sansSerif = [ - fonts.name + fonts.names.name0 ]; emoji = [ "Noto Fonts Color Emoji" diff --git a/modules/nixos/core/ssh/default.nix b/modules/nixos/core/ssh/default.nix index 322b85b..4544958 100755 --- a/modules/nixos/core/ssh/default.nix +++ b/modules/nixos/core/ssh/default.nix @@ -4,38 +4,55 @@ ... }: let - inherit (flake.config.people) user0 user1; - inherit (flake.config.machines) devices; + inherit (flake.config.people) + user0 + user1 + user2 + user3 + ; + inherit (flake.config.machines) + devices + ; hostname = config.networking.hostName; mars = devices.mars.name; deimos = devices.deimos.name; ceres = devices.ceres.name; + venus = devices.venus.name; + charon = devices.charon.name; + # Helper function to get SSH keys for a specific user getUserKeys = user: flake.config.people.users.${user}.sshKeys; - - user0Key = { - ${user0} = { - openssh.authorizedKeys.keys = getUserKeys user0; - }; - }; - user1Key = { - ${user1} = { - openssh.authorizedKeys.keys = getUserKeys user1; - }; - }; - in { users.users = - if hostname == mars then - user0Key // user1Key + if hostname == charon then + { } + else if hostname == mars then + { + ${user0} = { + openssh.authorizedKeys.keys = getUserKeys user0; + }; + ${user3} = { + openssh.authorizedKeys.keys = getUserKeys user3; + }; + } else if builtins.elem hostname [ deimos ceres ] then - user0Key + { + ${user0} = { + openssh.authorizedKeys.keys = getUserKeys user0; + }; + } + else if hostname == venus then + { + ${user2} = { + openssh.authorizedKeys.keys = getUserKeys user2; + }; + } else { }; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 27be9b5..ab0f839 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -17,12 +17,23 @@ in niri wayland searx + xserver flatpak wireGuard ; }; }; + venus = { + imports = builtins.attrValues { + inherit (modules) + plasma + sddm + tablet + ; + }; + }; + deimos = { imports = builtins.attrValues { inherit (modules) @@ -32,6 +43,7 @@ in plasma sddm flatpak + xserver espanso wireGuard glance @@ -44,11 +56,22 @@ in inherit (modules) plasma sddm + xserver wireGuard ; }; }; + charon = { + imports = builtins.attrValues { + inherit (modules) + gnome + flatpak + xserver + ; + }; + }; + ceres = { imports = builtins.attrValues { inherit (modules) @@ -66,6 +89,9 @@ in searx vaultwarden forgejo + xserver + # podgrab + # kanboard ; }; }; @@ -74,7 +100,6 @@ in imports = builtins.attrValues { inherit (modules) sops - xserver ; }; }; diff --git a/modules/nixos/desktop/hypr/idle/default.nix b/modules/nixos/desktop/hypr/idle/default.nix index ffbb5be..12c71f9 100755 --- a/modules/nixos/desktop/hypr/idle/default.nix +++ b/modules/nixos/desktop/hypr/idle/default.nix @@ -1,3 +1,8 @@ +{ + flake, + pkgs, + ... +}: { services.hypridle = { enable = true; diff --git a/modules/nixos/desktop/hypr/land/default.nix b/modules/nixos/desktop/hypr/land/default.nix index e3a7033..4038bdd 100755 --- a/modules/nixos/desktop/hypr/land/default.nix +++ b/modules/nixos/desktop/hypr/land/default.nix @@ -1,3 +1,8 @@ +{ + pkgs, + flake, + ... +}: { programs.hyprland = { enable = true; diff --git a/modules/nixos/desktop/sddm/default.nix b/modules/nixos/desktop/sddm/default.nix index a741bd1..f488896 100755 --- a/modules/nixos/desktop/sddm/default.nix +++ b/modules/nixos/desktop/sddm/default.nix @@ -16,8 +16,8 @@ in systemPackages = [ (pkgs.catppuccin-sddm.override { flavor = "macchiato"; - font = "${fonts.name}"; - fontSize = "${toString fonts.sizes.popups}"; + font = "${fonts.names.name0}"; + fontSize = "${toString fonts.sizes.desktop.size0}"; loginBackground = true; }) ]; diff --git a/modules/nixos/desktop/wayland/greetd/default.nix b/modules/nixos/desktop/wayland/greetd/default.nix index a526e77..a5cb1b3 100755 --- a/modules/nixos/desktop/wayland/greetd/default.nix +++ b/modules/nixos/desktop/wayland/greetd/default.nix @@ -1,14 +1,19 @@ { config, flake, + lib, pkgs, ... }: let inherit (flake.config.people) user0 + user1 + user2 ; inherit (flake.config.machines) devices; + venus = devices.venus.name; + charon = devices.charon.name; mars = devices.mars.name; host = config.networking.hostName; @@ -21,7 +26,15 @@ in settings = { default_session = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --time-format '%I:%M %p | %a • %h | %F' --theme border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red --cmd Hyprland"; - user = if host == mars then "greeter" else user0; + user = + if host == mars then + "greeter" + else if host == charon then + user1 + else if host == venus then + user2 + else + user0; }; }; }; diff --git a/modules/nixos/desktop/wayland/portals/default.nix b/modules/nixos/desktop/wayland/portals/default.nix index ae85cf1..0a99cee 100755 --- a/modules/nixos/desktop/wayland/portals/default.nix +++ b/modules/nixos/desktop/wayland/portals/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, flake, ... }: { environment.sessionVariables.NIXOS_OZONE_WL = "1"; diff --git a/modules/nixos/desktop/wayland/regreet/default.nix b/modules/nixos/desktop/wayland/regreet/default.nix index 871416a..7edcce6 100755 --- a/modules/nixos/desktop/wayland/regreet/default.nix +++ b/modules/nixos/desktop/wayland/regreet/default.nix @@ -1,7 +1,50 @@ -{ pkgs, ... }: +{ + pkgs, + flake, + lib, + ... +}: +let + inherit (flake.config.aesthetics.themes) + fonts + ; +in { programs.regreet = { enable = false; package = pkgs.greetd.regreet; + # settings = { + # appearance = { + # greeting_msg = "Back for more, I see."; + # }; + # GTK = { + # application_prefer_dark_theme = true; + # cursor_theme_name = lib.mkForce "catppuccin-macchiato-dark-cursors"; + # font_name = lib.mkForce "${fonts.names.name0} ${font.size.desktop}"; + # icon_theme_name = lib.mkForce "Papirus-Dark"; + # theme_name = lib.mkForce "catppuccin-macchiato-mauve-compact"; + # }; + # }; + # theme = { + # name = "catppuccin-macchiato-mauve-compact"; + # package = pkgs.catppuccin-gtk.override { + # size = "compact"; + # variant = "macchiato"; + # accents = [ + # "mauve" + # ]; + # }; + # }; + # cursorTheme = { + # name = "catppuccin-macchiato-dark-cursors"; + # package = pkgs.catppuccin-cursors.macchiatoDark; + # }; + # iconTheme = { + # name = "Papirus-Dark"; + # package = pkgs.catppuccin-papirus-folders.override { + # flavor = "macchiato"; + # accent = "mauve"; + # }; + # }; }; } diff --git a/modules/nixos/services/audiobookshelf/default.nix b/modules/nixos/services/audiobookshelf/default.nix index 32ad1ec..3ca62e4 100755 --- a/modules/nixos/services/audiobookshelf/default.nix +++ b/modules/nixos/services/audiobookshelf/default.nix @@ -1,4 +1,4 @@ -{ flake, ... }: +{ flake, config, ... }: let inherit (flake.config.services.instances) audiobookshelf web; inherit (flake.config.machines.devices) ceres; diff --git a/modules/nixos/services/glance/default.nix b/modules/nixos/services/glance/default.nix index c600215..18511e9 100755 --- a/modules/nixos/services/glance/default.nix +++ b/modules/nixos/services/glance/default.nix @@ -1,6 +1,8 @@ { config, flake, ... }: let - inherit (flake.config.services.instances) glance jellyfin; + inherit (flake.config.people) user0; + inherit (flake.config.services.instances) glance jellyfin web; + inherit (flake.config.machines.devices) ceres; service = glance; configPath = ./config; configImports = { diff --git a/modules/nixos/services/kanboard/default.nix b/modules/nixos/services/kanboard/default.nix index 7429d7a..85de06d 100755 --- a/modules/nixos/services/kanboard/default.nix +++ b/modules/nixos/services/kanboard/default.nix @@ -1,6 +1,13 @@ -{ flake, ... }: +{ + flake, + config, + ... +}: let - inherit (flake.config.services.instances) kanboard web; + inherit (flake.config.machines.devices) + ceres + ; + inherit (flake.config.services.instances) smtp kanboard web; service = kanboard; localhost = web.localhost.address0; host = service.domains.url0; diff --git a/modules/nixos/services/ollama/default.nix b/modules/nixos/services/ollama/default.nix index 78108cd..d82ccd0 100755 --- a/modules/nixos/services/ollama/default.nix +++ b/modules/nixos/services/ollama/default.nix @@ -1,4 +1,9 @@ -{ flake, config, ... }: +{ + flake, + config, + pkgs, + ... +}: let inherit (flake.config.machines.devices) mars diff --git a/modules/nixos/services/syncthing/default.nix b/modules/nixos/services/syncthing/default.nix index bbed92e..f94abc2 100755 --- a/modules/nixos/services/syncthing/default.nix +++ b/modules/nixos/services/syncthing/default.nix @@ -3,6 +3,7 @@ let inherit (flake.config.machines.devices) synology phone + tablet ; inherit (flake.config.services.instances) syncthing diff --git a/modules/nixos/sops/default.nix b/modules/nixos/sops/default.nix index 123602f..38e4a89 100755 --- a/modules/nixos/sops/default.nix +++ b/modules/nixos/sops/default.nix @@ -1,6 +1,40 @@ -{ flake, ... }: +{ + flake, + config, + ... +}: let - inherit (flake.config.people) user0; + inherit (flake.config.people) + user0 + user1 + user2 + user3 + ; + inherit (flake.config.machines) + devices + ; + hostname = config.networking.hostName; + mars = devices.mars.name; + ceres = devices.ceres.name; + venus = devices.venus.name; + charon = devices.charon.name; + deimos = devices.deimos.name; + + userLogic = + if + builtins.elem hostname [ + mars + deimos + ceres + ] + then + user0 + else if hostname == charon then + user1 + else if hostname == venus then + user2 + else + ""; in { sops = { @@ -10,23 +44,27 @@ in keyFile = "/var/lib/sops-nix/key.txt"; generateKey = false; }; - secrets = { - "ssh/private" = { - path = "/home/${user0}/.ssh/id_ed25519"; - owner = user0; - }; - "ssh/public" = { - path = "/home/${user0}/.ssh/id_ed25519.pub"; - owner = user0; - }; - "ssh/hosts" = { - path = "/home/${user0}/.ssh/known_hosts"; - owner = user0; - }; - "claude-api-key" = { - path = "/home/${user0}/.config/zed/claude-api-key"; - owner = user0; - }; - }; + secrets = + if hostname == charon then + { } + else + { + "ssh/private" = { + path = "/home/${userLogic}/.ssh/id_ed25519"; + owner = userLogic; + }; + "ssh/public" = { + path = "/home/${userLogic}/.ssh/id_ed25519.pub"; + owner = userLogic; + }; + "ssh/hosts" = { + path = "/home/${userLogic}/.ssh/known_hosts"; + owner = userLogic; + }; + "claude-api-key" = { + path = "/home/${user0}/.config/zed/claude-api-key"; + owner = user0; + }; + }; }; } diff --git a/profiles/user0/default.nix b/profiles/user0/default.nix index 6c49163..0c614f7 100755 --- a/profiles/user0/default.nix +++ b/profiles/user0/default.nix @@ -9,6 +9,7 @@ let inherit (flake) self; inherit (flake.config.people) user0; inherit (flake.config.machines) devices; + inherit (flake.config.services) instances; inherit (flake.config.people.users.${user0}) name paths; hostname = config.networking.hostName; @@ -48,17 +49,66 @@ in username = user0; homeDirectory = "/home/${user0}"; file = { - "./justfile" = import ./files/misc/justfile.nix { inherit flake config lib; }; + "./justfile" = + let + mars = devices.mars; + deimos = devices.deimos; + deviceLogic = if hostname == mars.name then deimos else mars; + + vpnServers = [ + "CA363" + "CA220" + "CA358" + "CA627" + ]; + + vpnCommands = lib.concatStrings ( + lib.imap0 (i: server: '' + vpn${toString i}: + sudo systemctl start wg-quick-Proton-${server}.service + + '') vpnServers + ); + in + { + text = '' + rebuildBoot: + nixos-rebuild boot --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace + + rebuild: + nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace + + update: + nix flake update --flake ~/Files/Projects/dotfiles + + elm: + cd ~/Files/Projects/website/frontend ; elm-land server + + server: + ssh ${devices.ceres.ip.address0} + + serverRemote: + ssh ${instances.web.remotehost.address0} + + ${deviceLogic.name}: + ssh ${deviceLogic.ip.address0} + + vpnoff: + sudo systemctl stop wg-quick-Proton-*.service + + ${vpnCommands} + ''; + }; "./Files/Scripts/list.sh" = { - source = ./files/scripts/list.sh; + source = ./files/list.sh; executable = true; }; "./Files/Scripts/loop.sh" = { - source = ./files/scripts/loop.sh; + source = ./files/loop.sh; executable = true; }; "./.config/scripts/get_weather.sh" = { - source = ./files/scripts/get_weather.sh; + source = ./files/get_weather.sh; executable = true; }; ".config/wallpaper" = { diff --git a/profiles/user0/files/scripts/get_weather.sh b/profiles/user0/files/get_weather.sh similarity index 100% rename from profiles/user0/files/scripts/get_weather.sh rename to profiles/user0/files/get_weather.sh diff --git a/profiles/user0/files/scripts/list.sh b/profiles/user0/files/list.sh similarity index 100% rename from profiles/user0/files/scripts/list.sh rename to profiles/user0/files/list.sh diff --git a/profiles/user0/files/scripts/loop.sh b/profiles/user0/files/loop.sh similarity index 100% rename from profiles/user0/files/scripts/loop.sh rename to profiles/user0/files/loop.sh diff --git a/profiles/user0/files/misc/justfile.nix b/profiles/user0/files/misc/justfile.nix deleted file mode 100755 index c464c7c..0000000 --- a/profiles/user0/files/misc/justfile.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - flake, - config, - lib, - ... -}: - -let - inherit (flake.config.machines) devices; - inherit (flake.config.services) instances; - - mars = devices.mars; - deimos = devices.deimos; - hostname = config.networking.hostName; - deviceLogic = if hostname == mars.name then deimos else mars; - - vpnServers = [ - "CA363" - "CA220" - "CA358" - "CA627" - ]; - - vpnCommands = lib.concatStrings ( - lib.imap0 (i: server: '' - vpn${toString i}: - sudo systemctl start wg-quick-Proton-${server}.service - - '') vpnServers - ); -in -{ - text = '' - rebuildBoot: - nixos-rebuild boot --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace - - rebuild: - nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace - - update: - nix flake update --flake ~/Files/Projects/dotfiles - - elm: - cd ~/Files/Projects/website/frontend ; elm-land server - - server: - ssh ${devices.ceres.ip.address0} - - serverRemote: - ssh ${instances.web.remotehost.address0} - - ${deviceLogic.name}: - ssh ${deviceLogic.ip.address0} - - vpnoff: - sudo systemctl stop wg-quick-Proton-*.service - - ${vpnCommands} - ''; -} diff --git a/profiles/user0/files/scripts/modnix.sh b/profiles/user0/files/modnix.sh similarity index 100% rename from profiles/user0/files/scripts/modnix.sh rename to profiles/user0/files/modnix.sh diff --git a/profiles/user0/files/scripts/reinstall.sh b/profiles/user0/files/reinstall.sh similarity index 100% rename from profiles/user0/files/scripts/reinstall.sh rename to profiles/user0/files/reinstall.sh diff --git a/profiles/user1/default.nix b/profiles/user1/default.nix index 2d21b03..c75cd5f 100755 --- a/profiles/user1/default.nix +++ b/profiles/user1/default.nix @@ -2,14 +2,13 @@ config, flake, pkgs, - lib, ... }: let inherit (flake) self; inherit (flake.config.people) user1; inherit (flake.config.machines) devices; - inherit (flake.config.people.users.${user1}) name paths; + inherit (flake.config.people.users.${user1}) name; hostname = config.networking.hostName; in { @@ -20,15 +19,13 @@ in isNormalUser = true; shell = pkgs.nushell; extraGroups = [ - "adbusers" - "disk" "libvirtd" - "netdev" + "disk" "networkmanager" - "plugdev" - "samba" "vboxusers" "wheel" + "adbusers" + "netdev" ]; }; }; @@ -38,22 +35,19 @@ in username = user1; homeDirectory = "/home/${user1}"; file = { + "./justfile" = { + source = ./files/justfile; + }; "./.config/scripts/get_weather.sh" = { - source = ./files/scripts/get_weather.sh; + source = ./files/get_weather.sh; executable = true; }; ".config/wallpaper" = { source = ./files/wallpaper; recursive = true; }; - "./.config/vesktop/themes/macchiato-theme.css" = { - source = ./files/themes/vesktop/macchiato-theme.css; - }; - }; - sessionVariables = { - VISUAL = lib.getExe pkgs.zed-editor; - GTK_THEME = "catppuccin-macchiato-mauve-compact"; }; + sessionVariables = { }; }; imports = [ { @@ -67,25 +61,4 @@ in ]; }; }; - systemd.tmpfiles = { - rules = - [ - "d ${paths.path0} 0755 ${user1} users -" - ] - ++ (map (path: "d /home/${user1}/${path} 0755 ${user1} users -") [ - "Files" - "Files/Scripts" - "Files/Games" - "Files/Screenshots" - ]) - ++ (map (path: "R /home/${user1}/${path} 0755 ${user1} users - -") [ - "Desktop" - "Documents" - "Music" - "Pictures" - "Public" - "Templates" - "Videos" - ]); - }; } diff --git a/profiles/user1/files/scripts/get_weather.sh b/profiles/user1/files/get_weather.sh similarity index 100% rename from profiles/user1/files/scripts/get_weather.sh rename to profiles/user1/files/get_weather.sh diff --git a/profiles/user1/files/justfile b/profiles/user1/files/justfile new file mode 100755 index 0000000..bb2295b --- /dev/null +++ b/profiles/user1/files/justfile @@ -0,0 +1,14 @@ +ewwEdit: + eww --config /home/nick/dotfiles/home-manager/modules/eww/config/ open centerPanel + +ewwLaunch: + ./home/nick/dotfiles/home-manager/modules/eww/config/scripts/master.sh + +gobrrr: + home-manager switch --flake ~/dotfiles#desktop + +gobrrrl: + nixos-rebuild switch --use-remote-sudo --flake /home/nick/dotfiles#desktop + +fuckoff: + shutdown now diff --git a/profiles/user1/files/wallpaper/0v1YQLSg6MTHNJwDdky4Igcc6nTTbMctPS8DhT_iGww.webp b/profiles/user1/files/wallpaper/0v1YQLSg6MTHNJwDdky4Igcc6nTTbMctPS8DhT_iGww.webp new file mode 100755 index 0000000..d2a4fa8 Binary files /dev/null and b/profiles/user1/files/wallpaper/0v1YQLSg6MTHNJwDdky4Igcc6nTTbMctPS8DhT_iGww.webp differ diff --git a/profiles/user1/files/wallpaper/9402963.jpg b/profiles/user1/files/wallpaper/9402963.jpg new file mode 100755 index 0000000..3423e88 Binary files /dev/null and b/profiles/user1/files/wallpaper/9402963.jpg differ diff --git a/profiles/user1/files/wallpaper/f.jpg b/profiles/user1/files/wallpaper/f.jpg new file mode 100755 index 0000000..12c9bce Binary files /dev/null and b/profiles/user1/files/wallpaper/f.jpg differ diff --git a/profiles/user1/files/wallpaper/murder-drones-action-scene-2hplnpxoeolfor3a.jpg b/profiles/user1/files/wallpaper/murder-drones-action-scene-2hplnpxoeolfor3a.jpg new file mode 100755 index 0000000..a78ad39 Binary files /dev/null and b/profiles/user1/files/wallpaper/murder-drones-action-scene-2hplnpxoeolfor3a.jpg differ diff --git a/profiles/user1/files/wallpaper/murder-drones-wallpapers-8.jpg b/profiles/user1/files/wallpaper/murder-drones-wallpapers-8.jpg new file mode 100755 index 0000000..0bf2e3f Binary files /dev/null and b/profiles/user1/files/wallpaper/murder-drones-wallpapers-8.jpg differ diff --git a/profiles/user2/default.nix b/profiles/user2/default.nix new file mode 100755 index 0000000..4603663 --- /dev/null +++ b/profiles/user2/default.nix @@ -0,0 +1,89 @@ +{ + config, + flake, + pkgs, + ... +}: +let + inherit (flake) self; + inherit (flake.config.people) user2; + inherit (flake.config.machines) devices; + inherit (flake.config.people.users.${user2}) name paths; + hostname = config.networking.hostName; +in + +{ + users = { + users.${user2} = { + description = name; + name = user2; + isNormalUser = true; + shell = pkgs.nushell; + extraGroups = [ + "adbusers" + "disk" + "libvirtd" + "minecraft" + "netdev" + "networkmanager" + "ollama" + "syncthing" + "vboxusers" + "wheel" + ]; + }; + }; + home-manager.users = { + ${user2} = { + home = { + username = user2; + homeDirectory = "/home/${user2}"; + file = { + "./justfile" = { + source = ./files/justfile; + }; + }; + sessionVariables = { + WLR_NO_HARDWARE_CURSORS = "1"; + WLR_DRM_NO_ATOMIC = "1"; + VIDEO_PLAYER = "vlc"; + EDITOR = "vscode"; + NIXPKGS_ALLOW_INSECURE = "1"; + }; + }; + + imports = [ + { + home.stateVersion = config.system.stateVersion; + } + { + imports = [ + self.homeModules."${devices.${hostname}.name}-${user2}" + ]; + } + ]; + }; + }; + systemd.tmpfiles = + let + directoriesAddedToHome = [ + "Projects" + ]; + + directoriesRemovedFromHome = [ + "Music" + "Public" + "Templates" + ]; + in + { + rules = + [ + "d ${paths.path0}/Projects 0755 ${user2} users -" + "Z ${paths.path0}/.ssh 700 ${user2} users -" + ] + ++ (map (path: "d /home/${user2}/${path} 0755 ${user2} users -") directoriesAddedToHome) + ++ (map (path: "R /home/${user2}/${path} 0755 ${user2} users - -") directoriesRemovedFromHome); + }; + +} diff --git a/profiles/user2/files/firefox/userChrome.css b/profiles/user2/files/firefox/userChrome.css new file mode 100755 index 0000000..7ae6cc9 --- /dev/null +++ b/profiles/user2/files/firefox/userChrome.css @@ -0,0 +1,266 @@ +/** + * Decrease size of the sidebar header + */ +*, html, body, html body, :root, #sidebar, #sidebar-box, .sidebar-panel, #root.root, #PlacesToolbarItems .bookmark-item, #PlacesToolbarItems .tab-item, .sidebar-placesTreechildren::-moz-tree-cell-text, .sidebar-placesTreechildren, .form-control { + font: 7pt "Lucida Sans", Classica !important; + outline: 0px !important; + border: 0px !important; +} + +html, body, :root, #sidebar, #sidebar-box, .sidebar-panel, #root.root, #PlacesToolbarItems.bookmark-item, #PlacesToolbarItems.tab-item, .titlebar, .toolbar, #PlacesToolbar, #personal-bookmarks, #bookmarks-toolbar-button, #navigator-toolbox, #nav-bar, #library { + background-color: #1a1920 !important; + outline: 0px !important; + border: 0px !important; +} + +@-moz-document url-prefix("moz-extension://4bfeee63-c7b3-4bb9-a7df-a2c0fd73eec0") { + *, html, body, html body, #root, :root, .Tab .title, .main-items .nav-item .len { + font-size: 7pt !important; + font-family: "Lucida Sans", "Classica" !important; + --tabs-font: 7pt "Lucida Sans", "Classica" !important; + background-color: #1a1920 !important; + outline: 0px !important; + border: 0px !important; + } +} + +/* extension icons opacity and fade */ + +#nav-bar toolbarbutton { + filter: grayscale(100%) !important; + opacity: 0.3 !important; + transition: transform 200ms ease 0.5s, opacity 200ms ease 0.5s !important; +} + +#nav-bar toolbarbutton:hover { + filter: grayscale(0%) !important; + opacity: 1 !important; + transition-duration: 200ms !important; + transition-delay: 0s !important; +} + +#sidebar-header toolbarbutton { + filter: grayscale(100%) !important; + opacity: 0 !important; + transition: transform 200ms ease 0.5s, opacity 200ms ease 0.5s !important; + min-width:150px !important; + align: center !important; +} +#sidebar-header toolbarbutton:hover { + filter: grayscale(0%) !important; + opacity: 1 !important; + transition-duration: 200ms !important; + transition-delay: 0s !important; + min-width:150px !important; + align: center !important; +} + +.close-icon {width:0px !important;} + +/* --- */ + + +/* hide address bar bloat */ + #tracking-protection-icon-container { display: none; } + #identity-box { display: none; } + #reader-mode-button { display: none; } + #pageActionButton { display: none; } + #pocket-button { display: none; } + #star-button { display: none; } + #urlbar-zoom-button { display: none; } +/* --- */ + +/* Go to arrow button at the end of the urlbar when searching */ +#urlbar-go-button { display: none; } + +/* Bottom left page loading status or url preview */ +/* #statuspanel { display: none !important; } */ + + +/* hide address bar*/ + +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_main_toolbar.css made available under Mozilla Public License v. 2.0 + S ee the above repository for updates as well as full license text. */ * + + /* This style hides the main toolbar and shows it when the cursor is over the tabs toolbar as well as whenever the focus is inside nav-bar, such as when urlbar is focused. */ + + :root{ --uc-navbar-transform: -40px } + :root[uidensity="compact"]{ --uc-navbar-transform: -4px } + + + #navigator-toolbox > div{ display: contents; } + :root[sessionrestored] :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox){ + transform: translateY(var(--uc-navbar-transform)) + } + :root:is([customizing],[chromehidden*="toolbar"]) :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox){ + transform: none !important; + opacity: 1 !important; + } + + #nav-bar, #nav-bar-customization-target { + height: 30px !important; + } + + #nav-bar-content, #nav-bar-content { + height: 20px !important; + margin-top: 4px !important; + } + + #urlbar { + width: 300px !important; + padding-left: 10px !important; + padding-right: -10px !important; + left: -50px !important; +} + + #nav-bar:not([customizing]){ + opacity: 0; + transition: transform 400ms ease 1.5s, opacity 400ms ease 1.5s !important; + position: relative; + z-index: 2; + } + #titlebar{ position: relative; z-index: 3 } + + /* Show when toolbox is focused, like when urlbar has received focus */ + #navigator-toolbox:focus-within > .browser-toolbar{ + transform: translateY(0); + opacity: 1; + transition-duration: 500ms, 200ms !important; + transition-delay: 0s !important; + } + /* Show when toolbox is hovered */ + #titlebar:hover ~ .browser-toolbar, + #nav-bar:hover, + #nav-bar:hover + #PersonalToolbar{ + transform: translateY(0); + opacity: 1; + transition-duration: 500ms, 200ms !important; + transition-delay: 0s !important; + } + /* This ruleset is separate, because not having :has support breaks other selectors as well */ + #mainPopupSet:has(> #appMenu-popup:hover) ~ #navigator-toolbox > .browser-toolbar{ + transition-delay: 33ms !important; + transform: translateY(0); + opacity: 1; + background-color: #1a1920 !important; + } + + /* Bookmarks toolbar needs so extra rules */ + #PersonalToolbar{ transition: transform 400ms ease 1.5s !important; position: relative; z-index: 1; background-color: #1a1920 !important; } + + /* Move up the content view */ + :root[sessionrestored]:not([inFullscreen],[chromehidden~="toolbar"]) > body > #browser{ margin-top: var(--uc-navbar-transform); } + +/* --- end hide --- */ + + + +#sidebar-header {color: #1a1920 !important; +font-size: 1.2em !important; +font-family: "Dumbledor 3", Times New Roman !important; +padding: 2px 6px 2px 3px !important; +} +#sidebar-header #sidebar-close { +padding: 3px !important; +} +#sidebar-header #sidebar-close .toolbarbutton-icon { +width: 0px !important; +height: 0px !important; +opacity: 0.6 !important; +} + +#TabsToolbar { +font-size: 0.8em !important; +font-family: "Troglodyte" !important; +display: none; +} + + +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0 + *See the above repository for updates as well as full license text. */ + +/* Show sidebar only when the cursor is over it */ +/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */ + +#sidebar-box{ +--uc-sidebar-width: 30px; +--uc-sidebar-hover-width: 180px; +--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */ +--uc-autohide-transition-duration: 115ms; +--uc-autohide-transition-type: linear; +position: relative; +min-width: var(--uc-sidebar-width) !important; +width: var(--uc-sidebar-width) !important; +max-width: var(--uc-sidebar-width) !important; +z-index:1; +} + +#sidebar-box[positionend]{ direction: rtl } +#sidebar-box[positionend] > *{ direction: ltr } + +#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr } +#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl } + +#main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; } + +#sidebar-splitter{ display: none } + +#sidebar-header{ +overflow: hidden; +color: var(--chrome-color, inherit) !important; +padding-inline: 0 !important; +} + +#sidebar-header::before, +#sidebar-header::after{ +content: ""; +display: flex; +padding-left: 8px; +} + +#sidebar-header, +#sidebar{ +transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; +min-width: var(--uc-sidebar-width) !important; +will-change: min-width; +} +#sidebar-box:hover > #sidebar-header, +#sidebar-box:hover > #sidebar{ +min-width: var(--uc-sidebar-hover-width) !important; +transition-delay: 0ms !important; +} + +.sidebar-panel{ + background-color: transparent !important; + color: var(--newtab-text-primary-color) !important; +} + +.sidebar-panel #search-box{ + -moz-appearance: none !important; + background-color: rgba(249,249,250,0.1) !important; + color: inherit !important; +} + +/* Add sidebar divider and give it background */ + +#sidebar, +#sidebar-header{ +background-color: inherit !important; +border-inline: 1px solid rgb(80,80,80); +border-inline-width: 0px 1px; +} + +#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl), +#sidebar-box[positionend] > *{ +border-inline-width: 1px 0px; +} + +/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */ + +#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ +inset-inline: auto 0px !important; +} +#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ +margin-inline: 0px !important; +border-left-style: solid !important; +} diff --git a/profiles/user2/files/firefox/userContent.css b/profiles/user2/files/firefox/userContent.css new file mode 100755 index 0000000..b6d02dc --- /dev/null +++ b/profiles/user2/files/firefox/userContent.css @@ -0,0 +1,126 @@ +/* home page edits */ + +@-moz-document url("about:home"), url("about:newtab"){ + html, body, #root, input { + background-color: #1a1920 !important; + } + + * { /* this is where I enforce the font everywhere */ + font-size: 8pt !important; + font-family: "Lucida Grande", "Classica" !important; + line-height: 9pt !important; + } /* so that my sidebar tabs aren't fucking HUGE */ + + .collapsible-section.ds-layout { + max-height: 400px !important; + background-color: #000 !important; + } + .search-wrapper { + filter: grayscale(80%) !important; + opacity: 0 !important; + vertical-align: middle !important; + } + .personalizeButtonWrapper { + opacity: 0.2 !important; + transition: transform 200ms ease 0.5s, opacity 200ms ease 0.5s !important; + } + .personalizeButtonWrapper:hover { + opacity: 0.7 !important; + transition-duration: 200ms !important; + transition-delay: 0s !important; + } + .search-inner-wrapper { /* begone THOT */ + display:none !important; + width: 300px !important; + min-height: 30px !important; + --newtab-search-icon: 0 !important; + } + .body-wrapper {margin-top: -200px;} + .context-menu-button { /* the button that has the menu to edit your shortcuts */ + margin-right: 10px !important; margin-top: 0px !important; opacity: 0 !important; + background-color: transparent !important; + } + .context-menu-button:hover {opacity: 0.7 !important;} + .top-site-outer, .top-site-inner { + margin-block-end: 0px !important; + background-color: transparent !important; + } + .top-site-outer:hover { + background-color: transparent !important; + } + .top-site-button {padding: 0px !important; background-color:transparent !important;} + + .tile { /* here be buttons */ + filter: grayscale(100%) !important; + background-color: transparent !important; + border: 0px !important; + opacity: 0.1 !important; + transition: 50ms ease 0.4s !important; + vertical-align: middle !important; + } + .tile:hover { + filter: grayscale(50%) !important; + opacity: 0.7 !important; + transition: 50ms ease 0.2s !important; + } + .icon-wrapper { + background-color: transparent !important; + border: 0px !important; + } + + .top-site-button .top-site-icon{ + background-color: transparent !important; + background-size: contain !important; + background-repeat: no-repeat !important; + background-position: center !important; + padding: 0px !important; + border-radius: 0px !important; + } + +/* custom icons so I can have custom+transparency on Home and New Tab pages */ + .top-site-button[href="http://deck.blue"] .top-site-icon{ + background-image: url("https://i.imgur.com/Z8IrhAY.png") !important; + } + .top-site-button[href="http://new.reddit.com"] .top-site-icon{ + background-image: url("https://i.imgur.com/3QIQIeD.png") !important; + } + .top-site-button[href="http://gaiaonline.com"] .top-site-icon{ + background-image: url("https://i.imgur.com/Vp7urqM.png") !important; + } + .top-site-button[href="http://orcanetwork.org"] .top-site-icon{ + background-image: url("https://i.imgur.com/hvKM68l.png") !important; + } + .top-site-button[href="http://whaleresearch.com"] .top-site-icon{ + background-image: url("https://i.imgur.com/uuBDA57.png") !important; + } + .top-site-button[href="http://whale-of-a-porpoise.blogspot.ca"] .top-site-icon{ + background-image: url("https://i.imgur.com/qm2BYfR.png") !important; + } + +/* !!! icon alignment and size fix !!! */ + .icon.icon-pin-small { + width: 0px !important; + } + .top-site-outer .title { + padding-top: 0px !important; + } + .top-site-outer { + margin-block-end: unset !important; + } + .top-site-outer .title span { + visibility: hidden !important; + } + .top-site-outer .title:not(.sponsored) .sponsored-label { + height: 0px !important; + } + .top-site-outer .context-menu-button:hover { + background-color: unset !important; + } + .top-site-outer .context-menu-button { + transition: none !important; + background-color: unset !important; + top: 0px !important; + } + .top-site-outer .default-icon {width:48px !important; height:48px !important;} +} +/* --- home page edits end --- */ diff --git a/profiles/user2/files/justfile b/profiles/user2/files/justfile new file mode 100755 index 0000000..7a6d847 --- /dev/null +++ b/profiles/user2/files/justfile @@ -0,0 +1,6 @@ +gobrr: + nixos-rebuild switch --use-remote-sudo --flake ~/Projects/dotfiles#desktop + + +fuckoff: + shutdown now diff --git a/profiles/user2/files/loop.sh b/profiles/user2/files/loop.sh new file mode 100755 index 0000000..c904110 --- /dev/null +++ b/profiles/user2/files/loop.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +while true ; do date ; natpmpc -a 1 0 udp 60 -g 10.2.0.1 && natpmpc -a 1 0 tcp 60 -g 10.2.0.1 || { echo -e "ERROR with natpmpc command \a" ; break ; } ; sleep 45 ; done diff --git a/profiles/user2/files/modnix.sh b/profiles/user2/files/modnix.sh new file mode 100755 index 0000000..15f2ffa --- /dev/null +++ b/profiles/user2/files/modnix.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +cp /etc/nixos/configuration.nix /etc/nixos/configuration.nix.backup + +sed -i '/services\.printing\.enable = true;/a\ nix.settings.experimental-features = ["nix-command" "flakes"];\n services.openssh.enable = true;' /etc/nixos/configuration.nix +sed -i '/thunderbird/a\ git\n vscode\n tomb' /etc/nixos/configuration.nix + +echo "/etc/nixos/configuration.nix updated successfully." \ No newline at end of file diff --git a/profiles/user3/default.nix b/profiles/user3/default.nix new file mode 100755 index 0000000..c9cdc1e --- /dev/null +++ b/profiles/user3/default.nix @@ -0,0 +1,91 @@ +{ + config, + flake, + pkgs, + lib, + ... +}: +let + inherit (flake) self; + inherit (flake.config.people) user3; + inherit (flake.config.machines) devices; + inherit (flake.config.people.users.${user3}) name paths; + hostname = config.networking.hostName; +in +{ + users = { + users.${user3} = { + description = name; + name = user3; + isNormalUser = true; + shell = pkgs.nushell; + extraGroups = [ + "adbusers" + "disk" + "libvirtd" + "netdev" + "networkmanager" + "plugdev" + "samba" + "vboxusers" + "wheel" + ]; + }; + }; + home-manager.users = { + ${user3} = { + home = { + username = user3; + homeDirectory = "/home/${user3}"; + file = { + "./.config/scripts/get_weather.sh" = { + source = ./files/get_weather.sh; + executable = true; + }; + ".config/wallpaper" = { + source = ./files/wallpaper; + recursive = true; + }; + "./.config/vesktop/themes/macchiato-theme.css" = { + source = ./files/themes/vesktop/macchiato-theme.css; + }; + }; + sessionVariables = { + VISUAL = lib.getExe pkgs.zed-editor; + GTK_THEME = "catppuccin-macchiato-mauve-compact"; + }; + }; + imports = [ + { + home.stateVersion = config.system.stateVersion; + } + { + imports = [ + self.homeModules."${devices.${hostname}.name}-${user3}" + ]; + } + ]; + }; + }; + systemd.tmpfiles = { + rules = + [ + "d ${paths.path0} 0755 ${user3} users -" + ] + ++ (map (path: "d /home/${user3}/${path} 0755 ${user3} users -") [ + "Files" + "Files/Scripts" + "Files/Games" + "Files/Screenshots" + ]) + ++ (map (path: "R /home/${user3}/${path} 0755 ${user3} users - -") [ + "Desktop" + "Documents" + "Music" + "Pictures" + "Public" + "Templates" + "Videos" + ]); + }; +} diff --git a/profiles/user3/files/get_weather.sh b/profiles/user3/files/get_weather.sh new file mode 100755 index 0000000..2aee731 --- /dev/null +++ b/profiles/user3/files/get_weather.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +for i in {1..5} +do + text=$(curl -s "https://wttr.in/$1?format=1") + if [[ $? == 0 ]] + then + text=$(echo "$text" | sed -E "s/\s+/ /g") + tooltip=$(curl -s "https://wttr.in/$1?format=4") + if [[ $? == 0 ]] + then + tooltip=$(echo "$tooltip" | sed -E "s/\s+/ /g") + echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}" + exit + fi + fi + sleep 2 +done +echo "{\"text\":\"error\", \"tooltip\":\"error\"}" \ No newline at end of file diff --git a/profiles/user1/files/themes/vesktop/macchiato-theme.css b/profiles/user3/files/themes/vesktop/macchiato-theme.css similarity index 100% rename from profiles/user1/files/themes/vesktop/macchiato-theme.css rename to profiles/user3/files/themes/vesktop/macchiato-theme.css diff --git a/profiles/user1/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg b/profiles/user3/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg similarity index 100% rename from profiles/user1/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg rename to profiles/user3/files/wallpaper/7yKtaRij2giAj0s09F6gmB8XIje.jpg diff --git a/profiles/user1/files/wallpaper/FTDCMyaXoAEUn5h.jpg b/profiles/user3/files/wallpaper/FTDCMyaXoAEUn5h.jpg similarity index 100% rename from profiles/user1/files/wallpaper/FTDCMyaXoAEUn5h.jpg rename to profiles/user3/files/wallpaper/FTDCMyaXoAEUn5h.jpg diff --git a/profiles/user1/files/wallpaper/cat-waves.png b/profiles/user3/files/wallpaper/cat-waves.png similarity index 100% rename from profiles/user1/files/wallpaper/cat-waves.png rename to profiles/user3/files/wallpaper/cat-waves.png diff --git a/profiles/user1/files/wallpaper/juliemao-1741428128332-6023.jpg b/profiles/user3/files/wallpaper/juliemao-1741428128332-6023.jpg similarity index 100% rename from profiles/user1/files/wallpaper/juliemao-1741428128332-6023.jpg rename to profiles/user3/files/wallpaper/juliemao-1741428128332-6023.jpg diff --git a/profiles/user1/files/wallpaper/pinksky.png b/profiles/user3/files/wallpaper/pinksky.png similarity index 100% rename from profiles/user1/files/wallpaper/pinksky.png rename to profiles/user3/files/wallpaper/pinksky.png diff --git a/profiles/user1/files/wallpaper/u6ne2q214dx71.jpg b/profiles/user3/files/wallpaper/u6ne2q214dx71.jpg similarity index 100% rename from profiles/user1/files/wallpaper/u6ne2q214dx71.jpg rename to profiles/user3/files/wallpaper/u6ne2q214dx71.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-0wj757.jpg b/profiles/user3/files/wallpaper/wallhaven-0wj757.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-0wj757.jpg rename to profiles/user3/files/wallpaper/wallhaven-0wj757.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-2ege2g.jpg b/profiles/user3/files/wallpaper/wallhaven-2ege2g.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-2ege2g.jpg rename to profiles/user3/files/wallpaper/wallhaven-2ege2g.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-4dj2qo.png b/profiles/user3/files/wallpaper/wallhaven-4dj2qo.png similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-4dj2qo.png rename to profiles/user3/files/wallpaper/wallhaven-4dj2qo.png diff --git a/profiles/user1/files/wallpaper/wallhaven-4xq6vv.png b/profiles/user3/files/wallpaper/wallhaven-4xq6vv.png similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-4xq6vv.png rename to profiles/user3/files/wallpaper/wallhaven-4xq6vv.png diff --git a/profiles/user1/files/wallpaper/wallhaven-5dyvy3.jpg b/profiles/user3/files/wallpaper/wallhaven-5dyvy3.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-5dyvy3.jpg rename to profiles/user3/files/wallpaper/wallhaven-5dyvy3.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-735xv3.jpg b/profiles/user3/files/wallpaper/wallhaven-735xv3.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-735xv3.jpg rename to profiles/user3/files/wallpaper/wallhaven-735xv3.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-8xe25y.jpg b/profiles/user3/files/wallpaper/wallhaven-8xe25y.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-8xe25y.jpg rename to profiles/user3/files/wallpaper/wallhaven-8xe25y.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-eyrj7o.jpg b/profiles/user3/files/wallpaper/wallhaven-eyrj7o.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-eyrj7o.jpg rename to profiles/user3/files/wallpaper/wallhaven-eyrj7o.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-g8ky73.jpg b/profiles/user3/files/wallpaper/wallhaven-g8ky73.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-g8ky73.jpg rename to profiles/user3/files/wallpaper/wallhaven-g8ky73.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-j8wzvp.jpg b/profiles/user3/files/wallpaper/wallhaven-j8wzvp.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-j8wzvp.jpg rename to profiles/user3/files/wallpaper/wallhaven-j8wzvp.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-nekxjk.png b/profiles/user3/files/wallpaper/wallhaven-nekxjk.png similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-nekxjk.png rename to profiles/user3/files/wallpaper/wallhaven-nekxjk.png diff --git a/profiles/user1/files/wallpaper/wallhaven-nryz87.jpg b/profiles/user3/files/wallpaper/wallhaven-nryz87.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-nryz87.jpg rename to profiles/user3/files/wallpaper/wallhaven-nryz87.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-r7yey1.jpg b/profiles/user3/files/wallpaper/wallhaven-r7yey1.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-r7yey1.jpg rename to profiles/user3/files/wallpaper/wallhaven-r7yey1.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-vge32m.jpg b/profiles/user3/files/wallpaper/wallhaven-vge32m.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-vge32m.jpg rename to profiles/user3/files/wallpaper/wallhaven-vge32m.jpg diff --git a/profiles/user1/files/wallpaper/wallhaven-vgxgem.jpg b/profiles/user3/files/wallpaper/wallhaven-vgxgem.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallhaven-vgxgem.jpg rename to profiles/user3/files/wallpaper/wallhaven-vgxgem.jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (1).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (1).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (1).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (1).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (10).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (10).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (10).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (10).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (11).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (11).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (11).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (11).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (12).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (12).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (12).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (12).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (13).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (13).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (13).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (13).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (14).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (14).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (14).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (14).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (15).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (15).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (15).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (15).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (16).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (16).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (16).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (16).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (17).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (17).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (17).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (17).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (19).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (19).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (19).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (19).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (2).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (2).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (2).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (2).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (20).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (20).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (20).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (20).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (21).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (21).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (21).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (21).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (22).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (22).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (22).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (22).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (23).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (23).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (23).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (23).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (24).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (24).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (24).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (24).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (26).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (26).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (26).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (26).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (27).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (27).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (27).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (27).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (28).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (28).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (28).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (28).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (29).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (29).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (29).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (29).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (3).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (3).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (3).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (3).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (30).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (30).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (30).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (30).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (31).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (31).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (31).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (31).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (32).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (32).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (32).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (32).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (34).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (34).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (34).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (34).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (35).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (35).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (35).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (35).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (37).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (37).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (37).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (37).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (38).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (38).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (38).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (38).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (4).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (4).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (4).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (4).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (5).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (5).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (5).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (5).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (6).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (6).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (6).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (6).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (7).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (7).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (7).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (7).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (8).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (8).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (8).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (8).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (9).jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (9).jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper (9).jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper (9).jpg diff --git a/profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper.jpg b/profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper.jpg similarity index 100% rename from profiles/user1/files/wallpaper/wallpaperflare.com_wallpaper.jpg rename to profiles/user3/files/wallpaper/wallpaperflare.com_wallpaper.jpg diff --git a/profiles/user1/files/wallpaper/yrTphE7NymvE-bSD.mp4 b/profiles/user3/files/wallpaper/yrTphE7NymvE-bSD.mp4 similarity index 100% rename from profiles/user1/files/wallpaper/yrTphE7NymvE-bSD.mp4 rename to profiles/user3/files/wallpaper/yrTphE7NymvE-bSD.mp4 diff --git a/systems/charon/config/boot.nix b/systems/charon/config/boot.nix new file mode 100755 index 0000000..cc3f996 --- /dev/null +++ b/systems/charon/config/boot.nix @@ -0,0 +1,44 @@ +{ + pkgs, + config, + ... +}: +{ + boot = { + extraModulePackages = [ + config.boot.kernelPackages.v4l2loopback.out + ]; + supportedFilesystems = [ + "ntfs" + ]; + initrd = { + network.openvpn.enable = true; + availableKernelModules = [ + "nvme" + "ahci" + "xhci_pci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + kernelModules = [ + ]; + }; + + kernelModules = [ + "kvm-amd" + "vfio-pci" + "v4l2loopback" + ]; + + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + systemd-boot.enable = true; + }; + }; +} diff --git a/systems/charon/config/filesystem.nix b/systems/charon/config/filesystem.nix new file mode 100755 index 0000000..0a7cbd4 --- /dev/null +++ b/systems/charon/config/filesystem.nix @@ -0,0 +1,30 @@ +{ + flake, + config, + ... +}: +let + inherit (flake.config.people) user1; + inherit (flake.config.machines.devices) charon; +in +{ + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/0457d426-f166-4f35-b77b-93321dca2581"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/1703-D452"; + fsType = "vfat"; + options = charon.boot.options; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/bedf4922-fa86-403a-846c-7d900dfb9086"; } + ]; + + systemd.tmpfiles.rules = [ + "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" + ]; +} diff --git a/systems/charon/config/graphics.nix b/systems/charon/config/graphics.nix new file mode 100755 index 0000000..c2bfd98 --- /dev/null +++ b/systems/charon/config/graphics.nix @@ -0,0 +1,12 @@ +{ + hardware = { + graphics = { + enable = true; + extraPackages = [ ]; + extraPackages32 = [ ]; + }; + }; + boot.initrd.kernelModules = [ + ]; + services.xserver.videoDrivers = [ "modesetting" ]; +} diff --git a/systems/charon/config/hardware.nix b/systems/charon/config/hardware.nix new file mode 100755 index 0000000..448923f --- /dev/null +++ b/systems/charon/config/hardware.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + hardware = { + firmware = builtins.attrValues { + inherit (pkgs) + rtl8761b-firmware + ; + }; + enableAllFirmware = true; + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/systems/charon/config/networking.nix b/systems/charon/config/networking.nix new file mode 100755 index 0000000..64ecc59 --- /dev/null +++ b/systems/charon/config/networking.nix @@ -0,0 +1,35 @@ +{ + lib, + flake, + ... +}: +let + inherit (flake.config.machines.devices) + charon + ; +in +{ + networking = { + hostName = charon.name; + networkmanager.enable = true; + nftables.enable = true; + useDHCP = lib.mkDefault true; + firewall = { + enable = true; + allowedTCPPorts = [ + ]; + }; + }; + services = { + avahi = { + enable = true; + openFirewall = true; + nssmdns4 = true; + }; + sshd.enable = true; + openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; + }; +} diff --git a/systems/charon/default.nix b/systems/charon/default.nix new file mode 100755 index 0000000..3882556 --- /dev/null +++ b/systems/charon/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: +let + configPath = ./config; + + desktopImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); +in +{ + imports = desktopImports; + nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; + system.stateVersion = lib.mkForce "24.05"; +} diff --git a/systems/deimos/config/filesystem.nix b/systems/deimos/config/filesystem.nix index cad72b5..b43d12e 100755 --- a/systems/deimos/config/filesystem.nix +++ b/systems/deimos/config/filesystem.nix @@ -6,6 +6,7 @@ let inherit (flake.config.people) user0 + user1 ; inherit (flake.config.machines.devices) deimos @@ -13,6 +14,7 @@ let ceres ; inherit (flake.config.services.instances) + samba jellyfin audiobookshelf ; @@ -98,6 +100,7 @@ in systemd.tmpfiles.rules = [ "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" + "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" ]; services.udisks2.enable = true; diff --git a/systems/deimos/config/sops.nix b/systems/deimos/config/sops.nix index 90298ee..45e8114 100755 --- a/systems/deimos/config/sops.nix +++ b/systems/deimos/config/sops.nix @@ -1,3 +1,9 @@ +{ flake, ... }: +let + inherit (flake.config.people) + user1 + ; +in { sops = { secrets = { @@ -11,6 +17,11 @@ owner = "root"; mode = "600"; }; + "network/${user1}" = { + path = "/var/lib/secrets/${user1}"; + owner = "root"; + mode = "600"; + }; }; }; } diff --git a/systems/mars/config/filesystem.nix b/systems/mars/config/filesystem.nix index 09021bb..8ed6745 100755 --- a/systems/mars/config/filesystem.nix +++ b/systems/mars/config/filesystem.nix @@ -4,9 +4,9 @@ ... }: let - inherit (flake.config.people) user0 user1; + inherit (flake.config.people) user0 user1 user3; inherit (flake.config.machines.devices) mars ceres synology; - inherit (flake.config.services.instances) jellyfin audiobookshelf; + inherit (flake.config.services.instances) samba jellyfin audiobookshelf; synologySecrets = config.sops.secrets."network/synology".path; ceresSecrets = config.sops.secrets."network/server".path; in @@ -16,6 +16,8 @@ in synologyDrives = [ "folder0" "folder1" + "folder2" + "folder3" ]; storageDrives = [ @@ -87,6 +89,7 @@ in systemd.tmpfiles.rules = [ "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" + "Z ${config.home-manager.users.${user3}.home.homeDirectory} 0755 ${user3} users -" "Z ${mars.storage0.mount} 0755 ${user0} users -" "Z ${mars.storage1.mount} 0755 ${user0} users -" ]; diff --git a/systems/phobos/config/filesystem.nix b/systems/phobos/config/filesystem.nix index 2cb057d..084517a 100755 --- a/systems/phobos/config/filesystem.nix +++ b/systems/phobos/config/filesystem.nix @@ -6,6 +6,7 @@ let inherit (flake.config.people) user0 + user1 ; inherit (flake.config.machines.devices) phobos @@ -30,6 +31,7 @@ in systemd.tmpfiles.rules = [ "Z ${config.home-manager.users.${user0}.home.homeDirectory} 0755 ${user0} users -" + "Z ${config.home-manager.users.${user1}.home.homeDirectory} 0755 ${user1} users -" ]; services.udisks2.enable = true; diff --git a/systems/venus/config/boot.nix b/systems/venus/config/boot.nix new file mode 100755 index 0000000..6344c96 --- /dev/null +++ b/systems/venus/config/boot.nix @@ -0,0 +1,47 @@ +{ + pkgs, + config, + ... +}: +{ + boot = { + extraModulePackages = [ + config.boot.kernelPackages.v4l2loopback.out + ]; + supportedFilesystems = [ "ntfs" ]; + initrd = { + availableKernelModules = [ + "amdgpu" + "nvme" + "ahci" + "xhci_pci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + kernelModules = [ ]; + }; + + kernelModules = [ + "kvm-amd" + "vfio-pci" + "v4l2loopback" + ]; + + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + systemd-boot.enable = false; + grub = { + enable = true; + device = "nodev"; + useOSProber = true; + efiSupport = true; + }; + }; + }; +} diff --git a/systems/venus/config/filesystem.nix b/systems/venus/config/filesystem.nix new file mode 100755 index 0000000..c517920 --- /dev/null +++ b/systems/venus/config/filesystem.nix @@ -0,0 +1,53 @@ +{ + config, + flake, + ... +}: +let + inherit (flake.config.people) user2; + inherit (flake.config.machines.devices) venus; +in +{ + imports = [ ]; + + fileSystems = + let + storageDrives = [ + "storage0" + "storage1" + ]; + + storageMounts = storage: { + name = "${venus.${storage}.mount}"; + value = { + device = venus.${storage}.device; + fsType = "ext4"; + options = venus.${storage}.options; + }; + }; + in + { + "/" = { + device = "/dev/disk/by-uuid/d02cb367-26e0-4708-8840-75dcc4362ff4"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/22BD-5A25"; + fsType = "vfat"; + options = venus.boot.options; + }; + } + // (builtins.listToAttrs (map storageMounts storageDrives)); + + swapDevices = [ + { device = "/dev/disk/by-uuid/cc7ab213-26c9-4567-91ca-9dba6e98c9d1"; } + ]; + + systemd.tmpfiles.rules = [ + "Z ${config.home-manager.users.${user2}.home.homeDirectory} 0755 ${user2} users -" + "Z ${venus.storage0.mount} 0755 ${user2} users -" + "Z ${venus.storage1.mount} 0755 ${user2} users -" + ]; + + services.udisks2.enable = true; +} diff --git a/systems/venus/config/graphics.nix b/systems/venus/config/graphics.nix new file mode 100755 index 0000000..b67a5df --- /dev/null +++ b/systems/venus/config/graphics.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + hardware = { + graphics = { + enable = true; + extraPackages = builtins.attrValues { + inherit (pkgs) + amdvlk + ; + inherit (pkgs.rocmPackages.clr) + icd + ; + }; + extraPackages32 = builtins.attrValues { + inherit (pkgs.driversi686Linux) + amdvlk + ; + }; + }; + }; + boot.initrd.kernelModules = [ + "amdgpu" + ]; +} diff --git a/systems/venus/config/hardware.nix b/systems/venus/config/hardware.nix new file mode 100755 index 0000000..8c79401 --- /dev/null +++ b/systems/venus/config/hardware.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + hardware = { + firmware = [ pkgs.rtl8761b-firmware ]; + enableAllFirmware = true; + cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/systems/venus/config/networking.nix b/systems/venus/config/networking.nix new file mode 100755 index 0000000..b774ad9 --- /dev/null +++ b/systems/venus/config/networking.nix @@ -0,0 +1,31 @@ +{ + lib, + flake, + ... +}: +let + inherit (flake.config.machines.devices) venus; +in +{ + networking = { + hostName = venus.name; + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + firewall = { + enable = true; + allowedTCPPorts = [ ]; + }; + }; + services = { + avahi = { + enable = true; + openFirewall = true; + nssmdns4 = true; + }; + sshd.enable = true; + openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; + }; +} diff --git a/systems/venus/default.nix b/systems/venus/default.nix new file mode 100755 index 0000000..e5f8f64 --- /dev/null +++ b/systems/venus/default.nix @@ -0,0 +1,20 @@ +{ + lib, + ... +}: +let + configPath = ./config; + + venusImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); +in +{ + imports = venusImports; + nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; + system.stateVersion = lib.mkForce "24.05"; +} diff --git a/templates/elm/flake.nix b/templates/elm/flake.nix index 176cb0d..4da66f2 100755 --- a/templates/elm/flake.nix +++ b/templates/elm/flake.nix @@ -4,22 +4,21 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11"; }; - outputs = - inputs@{ - flake-parts, - ... - }: - let - system = "x86_64-linux"; - in - flake-parts.lib.mkFlake { inherit inputs; } { + outputs = inputs @ { + flake-parts, + self, + ... + }: let + system = "x86_64-linux"; + in + flake-parts.lib.mkFlake {inherit inputs;} { imports = [ ./parts ]; systems = [ system ]; - perSystem = { + perSystem = {pkgs, ...}: { _module.args.pkgs = import inputs.nixpkgs { inherit system; }; diff --git a/templates/elm/parts/default.nix b/templates/elm/parts/default.nix index 25b3a1c..27fb3cf 100755 --- a/templates/elm/parts/default.nix +++ b/templates/elm/parts/default.nix @@ -1,14 +1,20 @@ -let - configPath = ./config; +{ + perSystem = { + pkgs, + lib, + config, + self', + ... + }: let + configPath = ./config; - devshellImports = - let + devshellImports = let files = builtins.attrNames (builtins.readDir configPath); in - map (name: configPath + "/${name}") ( - builtins.filter (name: builtins.match ".*\\.nix$" name != null) files - ); -in -{ - imports = devshellImports; + map + (name: configPath + "/${name}") + (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files); + in { + imports = devshellImports; + }; } diff --git a/templates/haskell/flake.nix b/templates/haskell/flake.nix index 7d6da48..d729ace 100755 --- a/templates/haskell/flake.nix +++ b/templates/haskell/flake.nix @@ -4,13 +4,13 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix"; }; - outputs = - inputs@{ - nixpkgs, - flake-parts, - ... - }: - flake-parts.lib.mkFlake { inherit inputs; } { + outputs = inputs @ { + self, + nixpkgs, + flake-parts, + ... + }: + flake-parts.lib.mkFlake {inherit inputs;} { imports = [ inputs.haskell-flake.flakeModule inputs.pre-commit-hooks-nix.flakeModule diff --git a/templates/haskell/parts/default.nix b/templates/haskell/parts/default.nix index 87acc4b..27fb3cf 100755 --- a/templates/haskell/parts/default.nix +++ b/templates/haskell/parts/default.nix @@ -1,15 +1,20 @@ -let - configPath = ./config; +{ + perSystem = { + pkgs, + lib, + config, + self', + ... + }: let + configPath = ./config; - devshellImports = - let + devshellImports = let files = builtins.attrNames (builtins.readDir configPath); in - map (name: configPath + "/${name}") ( - builtins.filter (name: builtins.match ".*\\.nix$" name != null) files - ); -in -{ - imports = devshellImports; - + map + (name: configPath + "/${name}") + (builtins.filter (name: builtins.match ".*\\.nix$" name != null) files); + in { + imports = devshellImports; + }; } diff --git a/templates/typst/flake.nix b/templates/typst/flake.nix index 2219c52..5115b35 100755 --- a/templates/typst/flake.nix +++ b/templates/typst/flake.nix @@ -12,6 +12,7 @@ inputs@{ nixpkgs, flake-parts, + self, ... }: flake-parts.lib.mkFlake { inherit inputs; } { diff --git a/templates/typst/parts/default.nix b/templates/typst/parts/default.nix index 87acc4b..93ccb77 100755 --- a/templates/typst/parts/default.nix +++ b/templates/typst/parts/default.nix @@ -1,15 +1,24 @@ -let - configPath = ./config; - - devshellImports = - let - files = builtins.attrNames (builtins.readDir configPath); - in - map (name: configPath + "/${name}") ( - builtins.filter (name: builtins.match ".*\\.nix$" name != null) files - ); -in { - imports = devshellImports; + perSystem = + { + pkgs, + lib, + config, + self', + ... + }: + let + configPath = ./config; + devshellImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); + in + { + imports = devshellImports; + }; } diff --git a/templates/website/flake.nix b/templates/website/flake.nix index 7d6da48..63da19c 100755 --- a/templates/website/flake.nix +++ b/templates/website/flake.nix @@ -6,6 +6,7 @@ }; outputs = inputs@{ + self, nixpkgs, flake-parts, ... diff --git a/templates/website/parts/default.nix b/templates/website/parts/default.nix index 25b3a1c..93ccb77 100755 --- a/templates/website/parts/default.nix +++ b/templates/website/parts/default.nix @@ -1,14 +1,24 @@ -let - configPath = ./config; - - devshellImports = - let - files = builtins.attrNames (builtins.readDir configPath); - in - map (name: configPath + "/${name}") ( - builtins.filter (name: builtins.match ".*\\.nix$" name != null) files - ); -in { - imports = devshellImports; + perSystem = + { + pkgs, + lib, + config, + self', + ... + }: + let + configPath = ./config; + + devshellImports = + let + files = builtins.attrNames (builtins.readDir configPath); + in + map (name: configPath + "/${name}") ( + builtins.filter (name: builtins.match ".*\\.nix$" name != null) files + ); + in + { + imports = devshellImports; + }; }