diff --git a/README.md b/README.md deleted file mode 100755 index 4521a54..0000000 --- a/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# dotfiles - -nix flake config! this is just used on my personal computer - -## users - -this flake is built upon a single user system for all hosts, enforced by [`modules/user.nix`](./modules/user.nix). this makes it alot easier to make modules that use nixos and `home-manager` - -for something more server oriented, check out [`nix-server`](https://git.reidlab.online/reidlab/nix-server) - -## hosts - -each host should have these files: - - `default.nix`, contains everything relating to the basic system - - `hardware.nix`, hardware configuration. - -## todo - - - move common config such as bootloader and networking settings to [`default.nix`](./default.nix) or some other common spot - - multi architecture configuration - - bitwarden - - qt themes? - - sddm cursors no work :( \ No newline at end of file diff --git a/assets/lockscreen.png b/assets/lockscreen.png deleted file mode 100644 index c42735e..0000000 Binary files a/assets/lockscreen.png and /dev/null differ diff --git a/assets/wallpaper.png b/assets/wallpaper.png deleted file mode 100644 index 7f7903a..0000000 Binary files a/assets/wallpaper.png and /dev/null differ diff --git a/config/dunst.conf b/config/dunst.conf deleted file mode 100644 index 328b280..0000000 --- a/config/dunst.conf +++ /dev/null @@ -1,64 +0,0 @@ -# https://github.com/catppuccin/dunst/blob/main/src/mocha.conf -[global] - frame_color = "#89B4FA" - separator_color= frame - - follow = none - width = 300 - height = 145 - origin = top-right - alignment = "left" - vertical_alignment = "center" - ellipsize = "middle" - offset = "15x15" - padding = 15 - horizontal_padding = 15 - text_icon_padding = 15 - icon_position = "left" - min_icon_size = 48 - max_icon_size = 64 - progress_bar = true - progress_bar_height = 8 - progress_bar_frame_width = 1 - progress_bar_min_width = 150 - progress_bar_max_width = 300 - separator_height = 2 - frame_width = 2 - corner_radius = 8 - transparency = 0 - gap_size = 8 - line_height = 0 - notification_limit = 0 - idle_threshold = 120 - history_length = 20 - show_age_threshold = 60 - markup = "full" - font = "Atkinson Hyperlegible Pro 10" - word_wrap = "yes" - sort = "yes" - shrink = "no" - indicate_hidden = "yes" - sticky_history = "yes" - ignore_newline = "no" - show_indicators = "no" - stack_duplicates = true - always_run_script = true - hide_duplicate_count = false - ignore_dbusclose = false - mouse_left_click = "do_action" - mouse_middle_click = "close_all" - mouse_right_click = "close_current" - -[urgency_low] -background = "#1E1E2E" -foreground = "#CDD6F4" - -[urgency_normal] -background = "#1E1E2E" -foreground = "#CDD6F4" - -[urgency_critical] -background = "#1E1E2E" -foreground = "#CDD6F4" -frame_color = "#FAB387" - diff --git a/config/nwg-drawer.css b/config/nwg-drawer.css deleted file mode 100644 index fa7cf4b..0000000 --- a/config/nwg-drawer.css +++ /dev/null @@ -1,27 +0,0 @@ -window { - /*background: @base;*/ - background: alpha(@base, 0.3); - color: @text; - font-family: 'Atkinson Hyperlegible Pro', 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK; - font-size: 14px; - font-style: normal; -} - -/* search entry */ -entry { - background-color: alpha(@surface0, 0.5); -} - -button, image { - background: none; - border: none -} - -button { - padding: 1em 0.5em; - border-radius: 1em; -} - -button:hover { - background-color: alpha(@surface0, 0.5); -} \ No newline at end of file diff --git a/config/rofi.rasi b/config/rofi.rasi deleted file mode 100644 index a4cad5c..0000000 --- a/config/rofi.rasi +++ /dev/null @@ -1,98 +0,0 @@ -* { - bg-col: #24273a; - bg-col-light: #313244; - border-col: #363a4f; - selected-col: #45475a; - pink: #f5c2e7; - fg-col: #cdd6f4; - fg-col2: @pink; - grey: #bac2de; - - width: 450px; -} - -element-text, element-icon , mode-switcher { - background-color: inherit; - text-color: inherit; -} - -window { - height: 500px; - border: 2px; - border-radius: 1em; - border-color: @pink; - background-color: @bg-col; -} - -mainbox {background-color: @bg-col;} - -inputbar { - margin: 10px 5px 5px 5px; - children: [prompt, entry]; - background-color: @bg-col; - padding: 1px; -} - -prompt { - background-color: transparent; - padding: 1px; - text-color: @fg-col; - border-radius: 1.5em; -} - -textbox-prompt-colon { - expand: true; - str: ":"; -} - -entry { - padding: 1px; - margin: 0px; - text-color: @fg-col; - background-color: @bg-col; -} - -listview { - border: 0px 0px 0px; - margin: 5px 0px 0px 10px; - columns: 1; - lines: 10; - background-color: @bg-col; -} - -element { - padding: 1px; - background-color: @bg-col; - text-color: @fg-col; -} - -element-icon {size: 12px;} - -element.selected { - background-color: @selected-col; - text-color: @fg-col2; -} - - -scrollbar { - width: 4px ; - border: 0; - handle-color: @fg-col; - handle-width: 8px ; - padding: 0; -} - -mode-switcher {spacing: 0;} - -button { - spacing: 0; - background-color: @bg-col-light; - text-color: @grey; - vertical-align: 0.5; - horizontal-align: 0.5; -} - -button.selected { - background-color: @bg-col; - text-color: @pink; -} \ No newline at end of file diff --git a/config/waybar.css b/config/waybar.css deleted file mode 100644 index b3bad77..0000000 --- a/config/waybar.css +++ /dev/null @@ -1,101 +0,0 @@ -* { - border: none; - border-radius: 0px; - min-height: 0; -} - -window#waybar { - color: @text; - /*background: alpha(@base, 0.6);*/ - background: @base; - border-radius: 1em; - /*font-family: VictorMono, Iosevka Nerd Font, Noto Sans CJK;*/ - /*font-family: 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK;*/ - font-family: CozetteVector, FontAwesome, Noto Sans CJK; - font-size: 13px; - font-style: normal; -} - -box.module, .modules-right box { - background-color: @surface0; - margin: 0 0.25em; - padding: 0.15em 0.25em; - border-radius: 1em; -} -.modules-right label.module { - margin: 0 0.5em; -} - -.modules-right box { - padding: 0.15em 0.4em; -} -.modules-left, .modules-right { - margin: 0.4em 0.5em; -} - -#workspaces { - background-color: @surface0; - padding: 0; -} - -#workspaces button { - background-color: transparent; - color: @text; - padding: 0 0.4em; -} - -#workspaces button:nth-child(1) { - border-top-left-radius: 1em; - border-bottom-left-radius: 1em; -} -#workspaces button:nth-last-child(1) { - border-top-right-radius: 1em; - border-bottom-right-radius: 1em; -} - -#workspaces button.empty { - color: @overlay0; -} - -#workspaces button.visible { - background: @surface1; -} - -#workspaces button.active { - background: @pink; - color: @surface0; -} - -#workspaces button.urgent { - background: @red; - color: @surface0; -} - -#window { - background: transparent; -} -window#waybar.floating #window { - color: @pink; -} - -#clock { - color: @lavender; -} - -#network { - color: @sapphire; -} - -#pulseaudio { - color: @pink; -} - -#custom-power { - color: @red; -} - -tooltip { - color: @text; - background: @base; - border: 1px solid @pink; -} diff --git a/default.nix b/default.nix index b8e7203..5f373fb 100755 --- a/default.nix +++ b/default.nix @@ -2,28 +2,16 @@ let inherit (builtins) toString; - inherit (lib.modules) mkDefault mkIf mkAliasOptionModule; + inherit (lib.modules) mkDefault mkIf; inherit (lib.my) mapModulesRec'; in { imports = [ inputs.home-manager.nixosModules.home-manager (mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name]) - inputs.nix-colors.homeManagerModules.default - inputs.hyprland.nixosModules.default ] ++ (mapModulesRec' (toString ./modules) import); - hm.imports = [ - inputs.hyprlock.homeManagerModules.hyprlock - inputs.hypridle.homeManagerModules.hypridle - inputs.hyprland.homeManagerModules.default - ]; - - environment.variables = { - NIXPKGS_ALLOW_UNFREE = "1"; - }; - nix = { package = pkgs.nix; @@ -32,43 +20,26 @@ in { nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; registry.nixpkgs.flake = inputs.nixpkgs; - settings = { + settings = { experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; keep-outputs = true; keep-derivations = true; substituters = [ "https://nix-community.cachix.org" - "https://nixpkgs-wayland.cachix.org" - "https://hyprland.cachix.org" ]; trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; - }; + }; }; - system.stateVersion = mkDefault "23.11"; + # set our git revision inside `nixos-version` system.configurationRevision = with inputs; mkIf (self ? rev) self.rev; + + # set home stateversion to system stateversion. Just Makes Sense hm.home.stateVersion = config.system.stateVersion; - boot = { - kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["pci_aspm.policy=performance"]; - }; - - # configure keymap in x11 - services.xserver.xkb = { - layout = "us"; - # i need to learn this sometime - # variant = "workman"; - }; - console = { - useXkbConfig = mkDefault true; - }; - time.timeZone = mkDefault "America/Los_Angeles"; i18n.defaultLocale = mkDefault "en_US.UTF-8"; @@ -79,11 +50,10 @@ in { unrar unzip micro curl wget - desktop-file-utils - shared-mime-info - xdg-user-dirs - xdg-utils + # im pretty sure removing this breaks nixos-rebuild + # have fun git ]; + system.stateVersion = mkDefault "23.11"; } diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 377c687..0000000 --- a/flake.lock +++ /dev/null @@ -1,670 +0,0 @@ -{ - "nodes": { - "base16-schemes": { - "flake": false, - "locked": { - "lastModified": 1696158499, - "narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=", - "owner": "tinted-theming", - "repo": "base16-schemes", - "rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-schemes", - "type": "github" - } - }, - "catppuccin-vsc": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1710544781, - "narHash": "sha256-nkxihb3D85k1nZV1CzlB3seMKtTEeKb688sblIGp/Bs=", - "owner": "catppuccin", - "repo": "vscode", - "rev": "d7b96ccac36fd29929bd97bc9357413cc4e0240c", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "vscode", - "type": "github" - } - }, - "hardware": { - "locked": { - "lastModified": 1711352745, - "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", - "owner": "nixos", - "repo": "nixos-hardware", - "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixos-hardware", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711604890, - "narHash": "sha256-vbI/gxRTq/gHW1Q8z6D/7JG/qGNl3JTimUDX+MwnC3A=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "3142bdcc470e1e291e1fbe942fd69e06bd00c5df", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "hyprcursor": { - "inputs": { - "hyprlang": "hyprlang_2", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1711466786, - "narHash": "sha256-sArxGyUBiCA1in+q6t0QqT+ZJiZ1PyBp7cNPKLmREM0=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "d3876f34779cc03ee51e4aafc0d00a4f187c7544", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hypridle": { - "inputs": { - "hyprlang": "hyprlang", - "nixpkgs": "nixpkgs_2", - "systems": "systems" - }, - "locked": { - "lastModified": 1710180874, - "narHash": "sha256-ZSn3wXQuRz36Ta/L+UCFKuUVG6QpwK2QmRkPjpQprU4=", - "owner": "hyprwm", - "repo": "hypridle", - "rev": "4395339a2dc410bcf49f3e24f9ed3024fdb25b0a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hypridle", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang_3", - "nixpkgs": "nixpkgs_3", - "systems": "systems_3", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1711673030, - "narHash": "sha256-atpS9c2LR56DIURlDLmuKHGmVQj9Xky2aETGhdTwMKg=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "fcd9d77b642c0cd45cae61cf10ed1924f2e7945b", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-catppuccin": { - "flake": false, - "locked": { - "lastModified": 1702668781, - "narHash": "sha256-9BhZq9J1LmHfAPBqOr64chiAEzS+YV6zqe9ma95V3no=", - "owner": "catppuccin", - "repo": "hyprland", - "rev": "fc228737d3d0c12e34a7fa155a0fc3192e5e4017", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "nixpkgs": [ - "hypridle", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1708212860, - "narHash": "sha256-nW3Zrhh9RJcMTvOcXAaKADnJM/g6tDf3121lJtTHnYo=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "11d5ccda071c153dfdc18ef65338956a51cef96a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_2": { - "inputs": { - "nixpkgs": [ - "hyprland", - "hyprcursor", - "nixpkgs" - ], - "systems": "systems_2" - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_3": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1711250455, - "narHash": "sha256-LSq1ZsTpeD7xsqvlsepDEelWRDtAhqwetp6PusHXJRo=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "b3e430f81f3364c5dd1a3cc9995706a4799eb3fa", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_4": { - "inputs": { - "nixpkgs": [ - "hyprlock", - "nixpkgs" - ], - "systems": "systems_4" - }, - "locked": { - "lastModified": 1711250455, - "narHash": "sha256-LSq1ZsTpeD7xsqvlsepDEelWRDtAhqwetp6PusHXJRo=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "b3e430f81f3364c5dd1a3cc9995706a4799eb3fa", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_5": { - "inputs": { - "nixpkgs": "nixpkgs_5", - "systems": "systems_6" - }, - "locked": { - "lastModified": 1711250455, - "narHash": "sha256-LSq1ZsTpeD7xsqvlsepDEelWRDtAhqwetp6PusHXJRo=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "b3e430f81f3364c5dd1a3cc9995706a4799eb3fa", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlock": { - "inputs": { - "hyprlang": "hyprlang_4", - "nixpkgs": "nixpkgs_4", - "systems": "systems_5" - }, - "locked": { - "lastModified": 1711622429, - "narHash": "sha256-JwHbbmAzX1Kfq1XAs06lKbk2TZL7mH/yLczG4BaiuTs=", - "owner": "hyprwm", - "repo": "hyprlock", - "rev": "7f8c9b6addce5174af78acaf1eb1d726fc4133b5", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlock", - "type": "github" - } - }, - "hyprpaper": { - "inputs": { - "hyprlang": "hyprlang_5", - "nixpkgs": "nixpkgs_6", - "systems": "systems_7" - }, - "locked": { - "lastModified": 1711556036, - "narHash": "sha256-z+ZgMjGC8540k3Z6Z49ZnEvbWyLGXtWPSCagMOrmuXk=", - "owner": "hyprwm", - "repo": "hyprpaper", - "rev": "5838c90cd29374935930281f62bc131d8bcf2295", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprpaper", - "type": "github" - } - }, - "nix-colors": { - "inputs": { - "base16-schemes": "base16-schemes", - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1707825078, - "narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=", - "owner": "misterio77", - "repo": "nix-colors", - "rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1", - "type": "github" - }, - "original": { - "owner": "misterio77", - "repo": "nix-colors", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1707268954, - "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1697935651, - "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1708475490, - "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0e74ca98a74bc7270d28838369593635a5db3260", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1711523803, - "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1711523803, - "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1708475490, - "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0e74ca98a74bc7270d28838369593635a5db3260", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1711163522, - "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1711523803, - "narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "2726f127c15a4cc9810843b96cad73c7eb39e443", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "catppuccin-vsc": "catppuccin-vsc", - "hardware": "hardware", - "home-manager": "home-manager", - "hypridle": "hypridle", - "hyprland": "hyprland", - "hyprland-catppuccin": "hyprland-catppuccin", - "hyprlock": "hyprlock", - "hyprpaper": "hyprpaper", - "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_7", - "waybar-catppuccin": "waybar-catppuccin" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "waybar-catppuccin": { - "flake": false, - "locked": { - "lastModified": 1678438606, - "narHash": "sha256-WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=", - "owner": "catppuccin", - "repo": "waybar", - "rev": "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "waybar", - "type": "github" - } - }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1709983277, - "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix old mode 100644 new mode 100755 index 45d9f7d..e26fc20 --- a/flake.nix +++ b/flake.nix @@ -6,21 +6,6 @@ home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - hardware.url = "github:nixos/nixos-hardware"; - nix-colors.url = "github:misterio77/nix-colors"; - - hyprland.url = "github:hyprwm/Hyprland"; - hyprlock.url = "github:hyprwm/hyprlock"; - hypridle.url = "github:hyprwm/hypridle"; - hyprpaper.url = "github:hyprwm/hyprpaper"; - - waybar-catppuccin.url = "github:catppuccin/waybar"; - waybar-catppuccin.flake = false; - hyprland-catppuccin.url = "github:catppuccin/hyprland"; - hyprland-catppuccin.flake = false; - - catppuccin-vsc.url = "github:catppuccin/vscode"; }; outputs = inputs @ { self, nixpkgs, ... }: @@ -35,7 +20,7 @@ config.allowAliases = false; overlays = extraOverlays ++ (lib.attrValues self.overlays); }; - pkgs = mkPkgs nixpkgs [ self.overlays.default inputs.catppuccin-vsc.overlays.default ]; + pkgs = mkPkgs nixpkgs [ self.overlays.default ]; lib = nixpkgs.lib.extend (final: prev: { my = import ./lib { diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 66f33f3..86ca36a 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -1,72 +1,27 @@ { config, lib, pkgs, ... }: -{ +in { imports = [ ./hardware.nix ]; hm.home.packages = with pkgs; [ # archives - zip xz unzip p7zip zstd + zip xz unzip p7zip # utils - ripgrep jq libqalculate + ripgrep jq # nix nix-output-monitor # system - btop duf lm_sensors ethtool pciutils usbutils powertop killall - # debug - strace ltrace lsof - # apps - firefox mpv qalculate-gtk + btop duf killall # misc - bat file which tree prismlauncher yt-dlp + file which tree ] ++ (with pkgs.my; [ - # none yet - ]) ++ (with pkgs.gnome; [ - # yay gnomeware!!!!!!!!!!!!!! yum - nautilus gnome-disk-utility pkgs.gnome-text-editor file-roller gnome-system-monitor loupe + # none yet ]); modules = { - security.useDoas = true; - - hardware = { - pipewire.enable = true; - }; - dev = { - enable = true; - }; - desktop = { - envProto = "wayland"; - - hyprland.enable = true; - hyprlock.enable = true; - hypridle.enable = true; - hyprpaper.enable = true; - - dunst.enable = true; - rofi.enable = true; - nwg-drawer.enable = true; - waybar.enable = true; - - sddm.enable = true; - - themes.active = "catppuccin"; - }; - software = { - # system - system.wezterm.enable = true; - system.fish.enable = true; - # editors - editors.micro.enable = true; - editors.vscode.enable = true; - # dev - dev.git.enable = true; - # distractions - distractions.discord.enable = true; - distractions.discord.armcord = true; - distractions.steam.enable = true; - }; + security.useDoas = false; }; networking.networkmanager.enable = true; diff --git a/hosts/goopnet-interface/hardware.nix b/hosts/goopnet-interface/hardware.nix index e55176b..83a985a 100755 --- a/hosts/goopnet-interface/hardware.nix +++ b/hosts/goopnet-interface/hardware.nix @@ -1,69 +1,32 @@ -{ inputs, config, lib, pkgs, modulesPath, ... }: +{ config, lib, pkgs, modulesPath, ... }: { imports = [ - inputs.hardware.nixosModules.common-cpu-intel-cpu-only - inputs.hardware.nixosModules.common-gpu-nvidia-nonprime - (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - boot.loader = { - # use systemd-boot over grub - grub.enable = lib.mkForce false; - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; + boot = { + initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + initrd.kernelModules = [ ]; + kernelModules = [ ]; + extraModulePackages = [ ]; + # TODO: move bootloader, networking, boot speed to another file? + kernelPackages = pkgs.linuxPackages_latest; + loader = { + # use u-boot over grub + grub.enable = lib.mkForce false; + generic-extlinux-compatible.enable = true; + }; }; - # nvidia - # !! you should keep this enabled if you use wayland !! - services.xserver.videoDrivers = [ "nvidia" ]; - - hardware.nvidia = { - package = config.boot.kernelPackages.nvidiaPackages.beta; - - modesetting.enable = true; - - powerManagement.enable = true; - - # this program is (respectfully) a pile of dogshit and is just bloat if using wayland - nvidiaSettings = false; - }; - - # VA-API - hardware.opengl = { - extraPackages = with pkgs; [ - nvidia-vaapi-driver - ]; - }; - - environment.variables = { - LIBVA_DRIVER_NAME= "nvidia"; - VDPAU_DRIVER = "nvidia"; - # TODO: remove this once nvidia gets their shit together - # https://forums.developer.nvidia.com/t/cueglstreamproducerconnect-returns-error-801-on-525-53-driver/233610/20 - NVD_BACKEND = "direct"; - }; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/08cfbb11-5943-4627-a2fc-fd41ce578027"; + fileSystems."/" = { + device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; fsType = "ext4"; }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C321-2746"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/04eddb76-4925-4192-a472-1c2c7e4ac9f7"; } - ]; + swapDevices = + [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -73,6 +36,6 @@ # networking.interfaces.end0.useDHCP = lib.mkDefault true; # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; } diff --git a/lib/default.nix b/lib/default.nix index dfd2478..1bb3d04 100755 --- a/lib/default.nix +++ b/lib/default.nix @@ -9,8 +9,8 @@ modules = import ./modules.nix { inherit lib; self.attrs = import ./attrs.nix { - inherit lib; - self = {}; + inherit lib; + self = {}; }; }; mylib = diff --git a/lib/options.nix b/lib/options.nix deleted file mode 100644 index 8853e02..0000000 --- a/lib/options.nix +++ /dev/null @@ -1,7 +0,0 @@ -{lib, ...}: let - inherit (lib.options) mkOption; -in { - mkOpt = type: default: mkOption {inherit type default;}; - - mkOpt' = type: default: description: mkOption {inherit type default description;}; -} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix deleted file mode 100644 index 84bd37b..0000000 --- a/modules/desktop/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop; -in { - options.modules.desktop = { - envProto = mkOption { - type = types.nullOr (types.enum ["x11" "wayland"]); - description = "What display protocol to use"; - }; - }; - - config = mkMerge [ - { - qt = { - enable = true; - platformTheme = "gnome"; - style = "adwaita-dark"; - }; - - modules.desktop.fonts.enable = true; - modules.desktop.fonts.baseFonts = true; - } - (mkIf (cfg.envProto == "wayland") { - environment.sessionVariables = { - # magic environment variables that improve wayland compat - NIXOS_OZONE_WL = "1"; - _JAVA_AWT_WM_NONEREPARENTING = "1"; - GDK_BACKEND = "wayland,x11"; - ANKI_WAYLAND = "1"; - ELECTRON_OZONE_PLATFORM_HINT = "wayland"; - XDG_SESSION_TYPE = "wayland"; - SDL_VIDEODRIVER = "wayland"; - CLUTTER_BACKEND = "wayland"; - # this fixes cursors on nvidia, maybe move all nvidia stuff to a module? or put this in hardware - WLR_NO_HARDWARE_CURSORS = "1"; - }; - }) - (mkIf (cfg.envProto == "x11") { - services.xserver.excludePackages = [ pkgs.xterm ]; - }) - ]; -} diff --git a/modules/desktop/dunst.nix b/modules/desktop/dunst.nix deleted file mode 100644 index d5d56c1..0000000 --- a/modules/desktop/dunst.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib, config, ... }: - -with lib; -let - cfg = config.modules.desktop.dunst; -in { - options.modules.desktop.dunst = { - enable = mkEnableOption "Enable dunst, a lightweight replacement for the notification daemons provided by most desktop environments"; - }; - - config = mkIf cfg.enable { - hm.services.dunst = { - enable = true; - configFile = ../../config/dunst.conf; - }; - }; -} diff --git a/modules/desktop/fonts.nix b/modules/desktop/fonts.nix deleted file mode 100644 index 6fa6fd9..0000000 --- a/modules/desktop/fonts.nix +++ /dev/null @@ -1,123 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - mkFontOption = kind: default: { - family = mkOption { - type = types.str; - default = default.family; - description = "Family name for ${kind} font profile"; - example = "Fira Code"; - }; - package = mkOption { - type = types.package; - default = default.package; - description = "Package for ${kind} font profile"; - example = "pkgs.fira-code"; - }; - size = mkOption { - type = types.number; - default = default.size; - description = "${kind} font profile size, px"; - example = "11"; - }; - }; - cfg = config.modules.desktop.fonts; -in { - options.modules.desktop.fonts = { - enable = mkEnableOption "Enable the font configuration module, configuring your chosen fonts"; - baseFonts = mkEnableOption "Add an extra set of base fonts"; - - fonts = { - sansSerif = mkFontOption "sansSerif" { - package = pkgs.my.atkinson-hyperlegible-pro; - family = "Atkinson Hyperlegible Pro"; - - size = 11; - }; - serif = mkFontOption "serif" { - package = pkgs.my.atkinson-hyperlegible-pro; - family = "Atkinson Hyperlegible Pro"; - - size = 11; - }; - monospace = mkFontOption "monospace" { - package = pkgs.cozette; - family = "CozetteVector"; - - size = 10; - }; - monospaceBitmap = mkFontOption "bitmap monospace" { - package = pkgs.cozette; - family = "Cozette"; - - size = 10; - }; - emoji = mkFontOption "emoji" { - package = pkgs.twitter-color-emoji; - family = "Twitter Color Emoji"; - - size = 10; # not applicable, but whatever - }; - }; - }; - - config = mkIf cfg.enable (mkMerge [ - { - fonts = { - fontDir.enable = true; - fontconfig.enable = true; - fontconfig.defaultFonts = { - sansSerif = [ cfg.fonts.sansSerif.family ]; - serif = [ cfg.fonts.serif.family ]; - monospace = [ cfg.fonts.monospace.family ]; - emoji = [ cfg.fonts.emoji.family ]; - }; - enableGhostscriptFonts = true; - packages = with pkgs; [ - corefonts - noto-fonts - noto-fonts-cjk-sans - liberation_ttf - ] ++ [ - cfg.fonts.sansSerif.package - cfg.fonts.serif.package - cfg.fonts.monospace.package - cfg.fonts.monospaceBitmap.package - cfg.fonts.emoji.package - ]; - }; - - hm.gtk.enable = true; - # not the best way of writing this (imagine if `name` was named `family`...) - hm.gtk.font = with cfg.fonts.sansSerif; { - package = package; - name = family; - - size = size; - }; - - hm.dconf.settings = { - "org/gnome/desktop/interface".font-name = with cfg.fonts.sansSerif; "${family} ${toString size}"; - "org/gnome/desktop/interface".document-font-name = with cfg.fonts.serif; "${family} ${toString size}"; - "org/gnome/desktop/interface".monospace-font-name = with cfg.fonts.monospace; "${family} ${toString size}"; - }; - } - (mkIf cfg.baseFonts { - fonts.enableDefaultPackages = true; - fonts.packages = with pkgs; [ - fira-code - fira-code-symbols - mplus-outline-fonts.githubRelease - dina-font - proggyfonts - atkinson-hyperlegible - cozette - twemoji-color-font - noto-fonts-color-emoji - noto-fonts-monochrome-emoji - font-awesome - ]; - }) - ]); -} diff --git a/modules/desktop/hypridle.nix b/modules/desktop/hypridle.nix deleted file mode 100644 index 84c7d76..0000000 --- a/modules/desktop/hypridle.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, config, pkgs, system, inputs , ... }: - -with lib; -let - cfg = config.modules.desktop.hypridle; -in { - options.modules.desktop.hypridle = { - enable = mkEnableOption "Enable hypridle, hyprland's idle daemon"; - package = mkOption { - type = types.package; - default = inputs.hypridle.packages.${system}.hypridle; - example = "pkgs.hypridle"; - }; - }; - - config = mkIf cfg.enable { - hm.services.hypridle = { - enable = true; - package = cfg.package; - - # the `date` command doesn't work if we just call hyprlock. Huh - # workaround is telling hyprctl to dispatch to execute it - # hacky, but i couldn't care less at the moment - # TODO: change this when/if it gets patched - lockCmd = "${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exec ${lib.getExe config.modules.desktop.hyprlock.package}"; - unlockCmd = "pkill -USR1 hyprlock"; - - listeners = let - hyprctl = "${config.modules.desktop.hyprland.package}/bin/hyprctl"; - in [ - { - timeout = 90; # 1.5 min - onTimeout = "${hyprctl} dispatch dpms off"; # turn off screen - onResume = "${hyprctl} dispatch dpms on"; # turn it back on - } - { - timeout = 60 * 2; # 2 min - onTimeout = "loginctl lock-session"; # lock computer - } - { - timeout = 60 * 30; # 15 min - onTimeout = "systemctl suspend"; # sleep/suspend - } - ]; - }; - }; -} diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix deleted file mode 100644 index 61be900..0000000 --- a/modules/desktop/hyprland.nix +++ /dev/null @@ -1,204 +0,0 @@ -{ inputs, lib, config, system, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop.hyprland; - hyprpkgs = inputs.hyprland.packages.${system}; -in { - options.modules.desktop.hyprland = { - enable = mkEnableOption "Enable hyprland, a dynamic tiling wayland compositor based on wlroots that doesn't sacrifice on its looks"; - package = mkOption { - type = types.package; - default = hyprpkgs.hyprland; - example = "pkgs.hyprland"; - }; - portalPackage = mkOption { - type = types.package; - default = hyprpkgs.xdg-desktop-portal-hyprland; - example = "pkgs.xdg-desktop-portal-hyprland"; - }; - }; - - config = mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = [ cfg.package ]; - xdg.portal = { - enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk cfg.portalPackage ]; - config = { - common = { - default = [ "hyprland" "gtk" ]; - }; - }; - }; - hm.wayland.windowManager.hyprland = { - enable = true; - xwayland.enable = true; - package = cfg.package; - - settings = { - source = []; - - "$mod" = "SUPER"; - bindm = [ # "bind mouse" - # move/resize windows with mod + lmb/rmb and dragging - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - bindel = [ # "bind held & locked" - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-" - ]; - bindl = [ # "bind locked" - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ]; - bindr = [ # "bind released" - "SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}" - ]; - bind = [ - "$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run" - ", print, exec, ${lib.getExe pkgs.grimblast} --freeze copy area" - "$mod, T, exec, ${lib.getExe pkgs.wezterm}" - - "$mod, Q, killactive, " - "$mod, V, togglefloating, " - "$mod, P, pseudo, " - "$mod, J, togglesplit, " - - # scroll through workspaces with mod + scroll - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - ] ++ ( - # workspaces - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) - 10) - ); - - input = { - kb_layout = "us"; - - follow_mouse = 1; - }; - - monitor= [ - "DVI-D-1, 1920x1080@60, 0x0, 1" - "DP-2, 1920x1080@60, 1920x0, 1" - # "DP-2, modeline 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync, 1920x0, 1, bitdepth, 10" - ]; - - exec-once = [ "${lib.getExe pkgs.networkmanagerapplet}" ]; - - env = [ - "XCURSOR_THEME,${config.modules.desktop.themes.cursorTheme.name}" - "XCURSOR_SIZE,24" - ]; - - general = { - gaps_in = 6; - gaps_out = 6; - border_size = 2; - no_border_on_floating = true; - - layout = "dwindle"; - - resize_on_border = true; - }; - - windowrulev2 = [ - # common popups - "float, class:file-roller" - "float, class:org.gnome.Loupe" - "float, initialTitle:^Open Folder$" - "float, initialTitle:^Open File$" - - # fix focus - "stayfocused, class:^pinentry-" - "stayfocused, class:^rofi-" - - # workspace moving - "workspace 1, class:^firefox" - "workspace 2, class:code-url-handler" - "workspace 4, class:ArmCord" - ]; - - blurls = [ - "gtk-layer-shell" # nwg-drawer - "waybar" - ]; - - decoration = { - rounding = 10; - - blur = { - enabled = true; - size = 4; - passes = 2; - #popups = true; - }; - - drop_shadow = false; - #shadow_range = 4; - #shadow_render_power = true; - }; - - animations = { - enabled = true; - - bezier = [ - "outCubic, 0.33, 1, 0.68, 1" - "outExpo, 0.16, 1, 0.3, 1" - ]; - - animation = [ - "windows, 1, 5, outExpo, popin" - "windowsOut, 1, 5, outCubic, popin 80%" - "border, 1, 2, outExpo" - "fade, 1, 3, outCubic" - "workspaces, 1, 6, outExpo" - ]; - }; - - dwindle = { - pseudotile = "yes"; - - preserve_split = "yes"; - }; - - master = { - new_is_master = true; - }; - - misc = { - force_default_wallpaper = 0; - disable_splash_rendering = true; - disable_hyprland_logo = true; - }; - }; - - extraConfig = '' - general { - col.active_border=$pink - col.inactive_border=$surface0 - } - decoration { - col.shadow=$surface0 - col.shadow_inactive=$surface0 - } - misc { - background_color=$crust - } - ''; - }; - }; -} diff --git a/modules/desktop/hyprlock.nix b/modules/desktop/hyprlock.nix deleted file mode 100644 index 6120357..0000000 --- a/modules/desktop/hyprlock.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ lib, config, inputs, system, ... }: - -with lib; -let - cfg = config.modules.desktop.hyprlock; -in { - options.modules.desktop.hyprlock = { - enable = mkEnableOption "Enable hyprlock, a simple, fast, multithreaded screen lock for hyprland"; - package = mkOption { - type = types.package; - default = inputs.hyprlock.packages.${system}.hyprlock; - example = "pkgs.hyprlock"; - }; - }; - - config = mkIf cfg.enable { - security.pam.services.hyprlock.text = "auth include login"; - powerManagement.resumeCommands = '' - ${cfg.package} - ''; - hm.programs.hyprlock = with config.colorScheme.palette; { - enable = true; - package = cfg.package; - general = { - hide_cursor = false; - no_fade_in = true; - no_fade_out = true; - }; - backgrounds = [ - { - path = toString ../../assets/lockscreen.png; - blur_passes = 3; - blur_size = 6; - } - ]; - labels = [ - { - text = "cmd[update:1000] echo \"$(date +'%H:%M')\""; - font_size = 58; - color = "rgb(${base05})"; - font_family = config.modules.desktop.fonts.fonts.sansSerif.family; - position = { x = 0; y = 30; }; - } - { - text = "cmd[update:1000] echo \"$(date +'%A %B %e')\""; - font_size = 14; - color = "rgb(${base05})"; - font_family = config.modules.desktop.fonts.fonts.sansSerif.family; - position = { x = 0; y = 10; }; - } - ]; - input-fields = [ - { - size = { width = 300; height = 28; }; - outline_thickness = 2; - dots_size = 0.2; - fade_on_empty = false; - placeholder_text = ""; - - outer_color = "rgb(${base0E})"; - inner_color = "rgb(${base00})"; - font_color = "rgb(${base05})"; - check_color = "rgb(${base02})"; - fail_color = "rgb(${base08})"; - capslock_color = "rgb(${base09})"; - - position = { x = 0; y = -30; }; - } - ]; - }; - }; -} diff --git a/modules/desktop/hyprpaper.nix b/modules/desktop/hyprpaper.nix deleted file mode 100644 index 4c79d38..0000000 --- a/modules/desktop/hyprpaper.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, config, inputs, system, ... }: - -with lib; -let - cfg = config.modules.desktop.hyprpaper; -in { - options.modules.desktop.hyprpaper = { - enable = mkEnableOption "Enable hyprpaper, a wayland wallpaper utility"; - package = mkOption { - type = types.package; - default = inputs.hyprpaper.packages.${system}.hyprpaper; - example = "pkgs.hyperpaper"; - }; - }; - - config = mkIf cfg.enable { - hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe cfg.package}" ]; - hm.xdg.configFile."hypr/hyprpaper.conf" = let - img = ../../assets/wallpaper.png; - in { - text = '' - preload = ${img} - wallpaper = ,${img} - splash = false - ''; - }; - }; -} diff --git a/modules/desktop/nwg-drawer.nix b/modules/desktop/nwg-drawer.nix deleted file mode 100644 index 558f07d..0000000 --- a/modules/desktop/nwg-drawer.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, config, pkgs, inputs, ... }: - -with lib; -let - cfg = config.modules.desktop.nwg-drawer; -in { - options.modules.desktop.nwg-drawer = { - enable = mkEnableOption "Enable nwg-drawer, a GTK based application launcher for wayland"; - }; - - config = mkIf cfg.enable { - hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe pkgs.nwg-drawer} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus" ]; - hm.xdg.configFile."nwg-drawer/drawer.css".text = builtins.concatStringsSep "\n" [ - "@import \"${inputs.waybar-catppuccin}/themes/mocha.css\";" - (lib.readFile ../../config/nwg-drawer.css) - ]; - }; -} diff --git a/modules/desktop/rofi.nix b/modules/desktop/rofi.nix deleted file mode 100644 index d687c37..0000000 --- a/modules/desktop/rofi.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop.rofi; -in { - options.modules.desktop.rofi = { - enable = mkEnableOption "Enable rofi, a window switcher, run dialog and dmenu replacement"; - }; - - config = mkIf cfg.enable { - hm.programs.rofi = { - enable = true; - package = pkgs.rofi-wayland; - font = with config.modules.desktop.fonts.fonts.monospace; "${family} ${toString size}"; - extraConfig = { - show-icons = true; - }; - theme = ../../config/rofi.rasi; - }; - }; -} diff --git a/modules/desktop/sddm.nix b/modules/desktop/sddm.nix deleted file mode 100644 index 5d7c31a..0000000 --- a/modules/desktop/sddm.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop.sddm; -in { - options.modules.desktop.sddm = { - enable = mkEnableOption "Enable SDDM, a display manager for X11 and Wayland windowing systems"; - }; - - config = mkIf cfg.enable { - services.xserver.enable = true; # this is needed, unfortunately! - environment.systemPackages = with pkgs; [ - config.modules.desktop.themes.sddmTheme.package - libsForQt5.qt5.qtsvg - libsForQt5.qt5.qtgraphicaleffects - libsForQt5.qt5.qtquickcontrols2 - ]; - services.xserver.displayManager.sddm = { - enable = true; - wayland.enable = true; - theme = config.modules.desktop.themes.sddmTheme.name; - settings = { - Theme = { - CursorTheme = config.modules.desktop.themes.cursorTheme.name; - }; - }; - }; - }; -} diff --git a/modules/desktop/themes/catppuccin/default.nix b/modules/desktop/themes/catppuccin/default.nix deleted file mode 100644 index 519c31b..0000000 --- a/modules/desktop/themes/catppuccin/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ inputs, config, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop.themes; - accent = "pink"; - variant = "mocha"; -in { - config = mkIf (cfg.active == "catppuccin") { - colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha; - - modules.desktop.themes = { - dark = true; - - gtkTheme = { - name = "Catppuccin-Mocha-Compact-Pink-Dark"; # TODO: put accent in here - package = pkgs.catppuccin-gtk.override { - variant = variant; - accents = [ accent ]; - tweaks = [ "rimless" ]; - size = "compact"; - }; - }; - - iconTheme = { - name = "WhiteSur-dark"; - package = pkgs.whitesur-icon-theme; - }; - - cursorTheme = { - name = "graphite-dark"; - package = pkgs.graphite-cursors; - }; - - sddmTheme = { - name = "catppuccin-sddm-corners"; - package = (pkgs.my.catppuccin-sddm-corners.override { - config.General = { - Background = ../../../../assets/lockscreen.png; - Font = config.modules.desktop.fonts.fonts.sansSerif.family; - }; - }); - }; - - editor = { - vscode = { - colorTheme = { - name = "Catppuccin Mocha"; - extension = (pkgs.vscode-extensions.catppuccin.catppuccin-vsc.override { - accent = accent; - boldKeywords = false; - italicComments = false; - italicKeywords = false; - extraBordersEnabled = false; - workbenchMode = "flat"; - bracketMode = "rainbow"; - }); - }; - iconTheme = { - name = "material-icon-theme"; - extension = pkgs.vscode-extensions.pkief.material-icon-theme; - }; - }; - }; - - hyprland = "${inputs.hyprland-catppuccin}/themes/${variant}.conf"; - }; - }; -} diff --git a/modules/desktop/themes/default.nix b/modules/desktop/themes/default.nix deleted file mode 100644 index a4692b3..0000000 --- a/modules/desktop/themes/default.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ lib, config, ... }: - -with lib; -with lib.my; -let - cfg = config.modules.desktop.themes; -in { - options.modules.desktop.themes = with types; { - active = mkOption { - type = types.nullOr types.str; - default = null; - description = "Name of the theme to apply; see modules/desktop/themes for a list of valid options"; - }; - - dark = mkOpt bool false; - - gtkTheme = { - name = mkOpt str ""; - package = mkPackageOption pkgs "gtk" {}; - }; - iconTheme = { - name = mkOpt str ""; - package = mkPackageOption pkgs "icon" {}; - }; - cursorTheme = { - name = mkOpt str ""; - package = mkPackageOption pkgs "cursor" {}; - }; - sddmTheme = { - name = mkOpt str ""; - package = mkPackageOption pkgs "sddm" {}; - }; - - editor = { - vscode = { - colorTheme = { - name = mkOpt str ""; - extension = mkPackageOption pkgs "extension" {}; - }; - iconTheme = { - name = mkOpt str ""; - extension = mkPackageOption pkgs "extension" {}; - }; - }; - }; - - hyprland = mkOpt (nullOr str) null; - }; - - config = mkIf (cfg.active != null) { - programs.dconf.enable = true; - - hm.dconf = { - enable = true; - settings."org/gnome/desktop/interface".color-scheme = mkIf cfg.dark "prefer-dark"; - settings."org/gnome/desktop/interface".gtk-theme = cfg.gtkTheme.name; - settings."org/gnome/desktop/interface".icon-theme = cfg.iconTheme.name; - settings."org/gnome/desktop/interface".cursor-theme = cfg.cursorTheme.name; - - settings."org/gnome/shell/extensions/user-theme".name = cfg.gtkTheme.name; - }; - - hm.gtk = { - enable = true; - cursorTheme = cfg.cursorTheme; - iconTheme = cfg.iconTheme; - theme = cfg.gtkTheme; - }; - - hm.services.dunst.iconTheme = { - name = cfg.iconTheme.name; - package = cfg.iconTheme.package; - }; - - hm.programs.vscode = { - extensions = [ - cfg.editor.vscode.colorTheme.extension - cfg.editor.vscode.iconTheme.extension - ]; - userSettings = { - "workbench.colorTheme" = cfg.editor.vscode.colorTheme.name; - "workbench.iconTheme" = cfg.editor.vscode.iconTheme.name; - }; - }; - - hm.wayland.windowManager.hyprland.settings.source = mkIf (cfg.hyprland != null) [ cfg.hyprland ]; - }; -} diff --git a/modules/desktop/waybar.nix b/modules/desktop/waybar.nix deleted file mode 100644 index eaba66f..0000000 --- a/modules/desktop/waybar.nix +++ /dev/null @@ -1,203 +0,0 @@ -{ lib, config, pkgs, inputs, ... }: - -with lib; -let - cfg = config.modules.desktop.waybar; -in { - options.modules.desktop.waybar = { - enable = mkEnableOption "Enable Waybar, a lightweight desktop environment based on GTK+"; - }; - - config = mkIf cfg.enable { - hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe pkgs.waybar}" ]; - hm.programs.waybar = { - enable = true; - style = builtins.concatStringsSep "\n" [ - "@import \"${inputs.waybar-catppuccin}/themes/mocha.css\";" - (lib.readFile ../../config/waybar.css) - ]; - settings = { - mainBar = { - layer = "top"; - position = "top"; - #spacing = 4; - height = 30; - margin-top = 6; - margin-left = 6; - margin-right = 6; - margin-bottom = 0; - modules-left = [ - "hyprland/workspaces" - "hyprland/window" - ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "group/status" - "tray" - "group/power" - ]; - - "group/status" = { - orientation = "inherit"; - modules = [ - "pulseaudio" - "cpu" - "memory" - #"network" - ]; - }; - "group/power" = { - orientation = "inherit"; - drawer = { - transition-duration = 200; - children-class = "not-power"; - transition-left-to-right = false; - }; - modules = [ - "custom/power" - "custom/lock" - "custom/reboot" - "custom/quit" - ]; - }; - "custom/quit" = { - format = ""; - tooltip = true; - tooltip-format = "Exit Hyprland"; - on-click = "${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit"; - }; - "custom/lock" = { - format = ""; - tooltip = true; - tooltip-format = "Lock the system"; - on-click = "${lib.getExe config.modules.desktop.hyprlock.package}"; - }; - "custom/reboot" = { - format = "↻"; - tooltip = true; - tooltip-format = "Reboot"; - on-click = "reboot"; - }; - "custom/power" = { - format = "⏻"; - tooltip = true; - tooltip-format = "Power off"; - on-click = "shutdown now"; - }; - "hyprland/workspaces" = { - format = "{icon}"; - format-icons = { - "1" = ""; - "2" = ""; - "3" = ""; - "4" = ""; - urgent = ""; - default = "•"; - }; - persistent-workspaces = { - "1" = []; - "2" = []; - "3" = []; - "4" = []; - }; - }; - "hyprland/window" = { - format = "{}"; - icon = true; - icon-size = 16; - rewrite = { - "(.*) — Mozilla Firefox" = "$1"; # the dash here is SLIGHTLY different. Wow - "(.*) - Visual Studio Code" = "$1"; - #"(.*\\.nix\\s.*)" = ""; - "(\\S+\\.html\\s.*)" = " $1"; - "(\\S+\\.css\\s.*)" = " $1"; - "(\\S+\\.js\\s.*)" = " $1"; - "(\\S+\\.ts\\s.*)" = " $1"; - "(\\S+\\.go\\s.*)" = " $1"; - "(\\S+\\.lua\\s.*)" = " $1"; - "(\\S+\\.java\\s.*)" = " $1"; - "(\\S+\\.rb\\s.*)" = " $1"; - "(\\S+\\.php\\s.*)" = " $1"; - "(\\S+\\.jsonc?\\s.*)" = " $1"; - "(\\S+\\.md\\s.*)" = " $1"; - "(\\S+\\.txt\\s.*)" = " $1"; - "(\\S+\\.cs\\s.*)" = "󰌛 $1"; - "(\\S+\\.c\\s.*)" = " $1"; - "(\\S+\\.cpp\\s.*)" = " $1"; - "(\\S+\\.zig\\s.*)" = " $1"; - "(\\S+\\.rs\\s.*)" = " $1"; - "(\\S+\\.hs\\s.*)" = " $1"; - ".*Discord | (.*) | .*" = "$1 - ArmCord"; - #"(.*) - ArmCord" = "$1"; - }; - separate-outputs = true; - }; - pulseaudio = { - format = "{icon} {volume}%"; - format-bluetooth = "{icon} {volume}%"; - format-muted = "婢 {volume}%"; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = ["" "" ""]; - }; - scroll-step = 1; - on-click = "${lib.getExe pkgs.pavucontrol}"; - ignored-sinks = ["Easy Effects Sink"]; - }; - cpu = { - interval = 4; - format = " {usage}% {avg_frequency}GHz"; - }; - memory = { - interval = 4; - format = " {percentage}%"; - tooltip-format = "{used:0.1f}GiB/{avail:0.1f}GiB used\n{swapUsed:0.1f}GiB/{swapAvail:0.1f}GiB swap"; - }; - "network" = { - format = ""; - format-ethernet = ""; - format-wifi = " {signalStrength}%"; - format-disconnected = ""; - tooltip-format = "{ifname} via {gwaddr}"; - tooltip-format-wifi = "connected to {essid}"; - tooltip-format-ethernet = "{ifname}"; - tooltip-format-disconnected = "Disconnected"; - }; - "clock" = { - format = "{:%H:%M}"; - format-alt = "{:%a %b %d %R}"; - tooltip-format = "{calendar}"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - on-click-right = "mode"; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; - }; - actions = { - on-click-right = "mode"; - on-click-forward = "tz_up"; - on-click-backward = "tz_down"; - on-scroll-up = "shift_up"; - on-scroll-down = "shift_down"; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/modules/dev/default.nix b/modules/dev/default.nix deleted file mode 100644 index 04822b6..0000000 --- a/modules/dev/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, config, ... }: - -with lib; -let - cfg = config.modules.dev; -in { - options.modules.dev = { - enable = mkEnableOption "General development utilities"; - }; - - config = mkIf cfg.enable { - programs.direnv = { - enable = true; - silent = true; - nix-direnv.enable = true; - }; - }; -} \ No newline at end of file diff --git a/modules/hardware/pipewire.nix b/modules/hardware/pipewire.nix deleted file mode 100644 index 406b94c..0000000 --- a/modules/hardware/pipewire.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ pkgs, config, lib, ... }: - -with lib; -let - cfg = config.modules.hardware.pipewire; -in { - options.modules.hardware.pipewire = { - enable = mkEnableOption "Enable pipewire, a modern audio server"; - }; - - config = mkIf cfg.enable { - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - }; -} diff --git a/modules/security.nix b/modules/security.nix index c4db9ad..14162ad 100755 --- a/modules/security.nix +++ b/modules/security.nix @@ -9,62 +9,62 @@ in { }; config = mkIf cfg.enable { - boot = { - tmp.useTmpfs = lib.mkDefault true; - tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs); - - kernel.sysctl = { - # magic sysrq key, allows low-level commands through keyboard input - "kernel.sysrq" = 0; + boot = { + tmp.useTmpfs = lib.mkDefault true; + tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs); + + kernel.sysctl = { + # magic sysrq key, allows low-level commands through keyboard input + "kernel.sysrq" = 0; - ## TCP hardening - # prevent bogus ICMP errors from filling up logs - "net.ipv4.icmp_ignore_bogus_error_responses" = 1; - # do not accept IP source packets (we are not a router) - "net.ipv4.conf.all.accept_source_route" = 0; - "net.ipv6.conf.all.accept_source_route" = 0; - # don't send ICMP redirects (again, we're not a router) - "net.ipv4.conf.all.send_redirects" = 0; - "net.ipv4.conf.default.send_redirects" = 0; - # refuse ICMP redirects (MITM mitigations) - "net.ipv4.conf.all.accept_redirects" = 0; - "net.ipv4.conf.default.accept_redirects" = 0; - "net.ipv4.conf.all.secure_redirects" = 0; - "net.ipv4.conf.default.secure_redirects" = 0; - "net.ipv6.conf.all.accept_redirects" = 0; - "net.ipv6.conf.default.accept_redirects" = 0; - # protects against SYN flood attacks - "net.ipv4.tcp_syncookies" = 1; - # incomplete protection against TIME-WAIT assassination - "net.ipv4.tcp_rfc1337" = 1; + ## TCP hardening + # prevent bogus ICMP errors from filling up logs + "net.ipv4.icmp_ignore_bogus_error_responses" = 1; + # do not accept IP source packets (we are not a router) + "net.ipv4.conf.all.accept_source_route" = 0; + "net.ipv6.conf.all.accept_source_route" = 0; + # don't send ICMP redirects (again, we're not a router) + "net.ipv4.conf.all.send_redirects" = 0; + "net.ipv4.conf.default.send_redirects" = 0; + # refuse ICMP redirects (MITM mitigations) + "net.ipv4.conf.all.accept_redirects" = 0; + "net.ipv4.conf.default.accept_redirects" = 0; + "net.ipv4.conf.all.secure_redirects" = 0; + "net.ipv4.conf.default.secure_redirects" = 0; + "net.ipv6.conf.all.accept_redirects" = 0; + "net.ipv6.conf.default.accept_redirects" = 0; + # protects against SYN flood attacks + "net.ipv4.tcp_syncookies" = 1; + # incomplete protection against TIME-WAIT assassination + "net.ipv4.tcp_rfc1337" = 1; - ## TCP optimization - # TCP fastopen - "net.ipv4.tcp_fastopen" = 3; - # bufferbloat mitigations + improvement in throughput and latency - "net.ipv4.tcp_conjestion_control" = "bbr"; - "net.core.default_qdisc" = "cake"; + ## TCP optimization + # TCP fastopen + "net.ipv4.tcp_fastopen" = 3; + # bufferbloat mitigations + improvement in throughput and latency + "net.ipv4.tcp_conjestion_control" = "bbr"; + "net.core.default_qdisc" = "cake"; + }; + kernelModules = [ "tcp_bbr" ]; }; - kernelModules = [ "tcp_bbr" ]; - }; - security = { - # prevents replacing the kernel without a reboot - protectKernelImage = true; - # rtkit allows unprivileged processes to use realtime scheduling - # polkit allows unprivileged processes to speak to privileged processes (ex. nmtui, reboot) - rtkit.enable = true; - polkit.enable = true; - }; + security = { + # prevents replacing the kernel without a reboot + protectKernelImage = true; + # rtkit allows unprivileged processes to use realtime scheduling + # polkit allows unprivileged processes to speak to privileged processes (ex. nmtui, reboot) + rtkit.enable = true; + polkit.enable = true; + }; - # personal computer? no firewall ty :3 - networking.firewall.enable = false; - } // (mkIf cfg.useDoas { - security.sudo.enable = false; - security.doas.enable = true; - security.doas.extraRules = [ - { users = [ config.user.name ]; noPass = true; persist = false; keepEnv = true; } - ]; - environment.systemPackages = with pkgs; [ doas-sudo-shim ]; - }); + # personal computer? no firewall ty :3 + networking.firewall.enable = false; + } // (mkIf cfg.useDoas { + security.sudo.enable = false; + security.doas.enable = true; + security.doas.extraRules = [ + { users = [ config.user.name ]; noPass = true; persist = false; keepEnv = true; } + ]; + environment.systemPackages = with pkgs; [ doas-sudo-shim ]; + }); } diff --git a/modules/software/dev/git.nix b/modules/software/dev/git.nix deleted file mode 100644 index 7a218a5..0000000 --- a/modules/software/dev/git.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ pkgs, config, lib, ... }: - -with lib; -let - cfg = config.modules.software.dev.git; -in { - options.modules.software.dev.git = { - enable = mkEnableOption "Enable git. You know what git is"; - }; - - config = mkIf cfg.enable { - hm.programs.git = { - enable = true; - package = pkgs.gitFull; - - userName = ''Reid "reidlab"''; - userEmail = "reidlab325@gmail.com"; - - ignores = [ - # General - "*.direnv" - "*.envrc" - - # OS related - ".DS_Store?" - ".DS_Store" - ".CFUserTextEncoding" - ".Trash" - ".Xauthority" - "thumbs.db" - "Thumbs.db" - "Icon?" - ]; - - aliases = { - ranked-authors = "!git authors | sort | uniq -c | sort -n"; - emails = '' - !git log --format="%aE" | sort -u - ''; - email-domains = '' - !git log --format="%aE" | awk -F'@' '{print $2}' | sort -u - ''; - graph = '' - log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n" - ''; - }; - - extraConfig = { - push.autoSetupRemote = true; - pull.rebase = true; - init.defaultBranch = "main"; - }; - }; - }; -} diff --git a/modules/software/distractions/discord.nix b/modules/software/distractions/discord.nix deleted file mode 100644 index 8dd2020..0000000 --- a/modules/software/distractions/discord.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - cfg = config.modules.software.distractions.discord; -in { - options.modules.software.distractions.discord = { - enable = mkEnableOption "Enable discord, a social messaging app"; - armcord = mkEnableOption "Use armcord, an alternative discord client."; - }; - - config = mkIf cfg.enable (mkMerge [ - (mkIf (!cfg.armcord) { - user.packages = let - flags = - [ - "--flag-switches-begin" - "--flag-switches-end" - "--disable-gpu-memory-buffer-video-frames" - "--enable-accelerated-mjpeg-decode" - "--enable-accelerated-video" - "--enable-gpu-rasterization" - "--enable-native-gpu-memory-buffers" - "--enable-zero-copy" - "--ignore-gpu-blocklist" - "--disable-features=UseOzonePlatform" - "--enable-features=VaapiVideoDecoder" - ]; - discord = (pkgs.discord-canary.override { - withOpenASAR = true; - withVencord = true; - }).overrideAttrs (old: { - preInstall = '' - gappsWrapperArgs=+("--add-flags" "${concatStringsSep " " flags}") - ''; - }); - in [ discord ]; - }) - (mkIf cfg.armcord { - user.packages = with pkgs; [ armcord ]; - }) - ]); -} \ No newline at end of file diff --git a/modules/software/distractions/steam.nix b/modules/software/distractions/steam.nix deleted file mode 100644 index 7a21932..0000000 --- a/modules/software/distractions/steam.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - cfg = config.modules.software.distractions.steam; -in { - options.modules.software.distractions.steam = { - enable = mkEnableOption "Enable Steam, the game distribution software"; - }; - - config = mkIf cfg.enable { - programs.steam.enable = true; - programs.gamemode = { - enable = true; - enableRenice = true; - settings = {}; - }; - programs.gamescope = { - enable = true; - capSysNice = true; - }; - programs.steam.gamescopeSession = { - enable = true; - args = [ "-W 1920" "-H 1080" "-r 60" "--expose-wayland" "-e" ]; - }; - user.packages = [ pkgs.protontricks pkgs.steam-run ]; - }; -} \ No newline at end of file diff --git a/modules/software/editors/micro.nix b/modules/software/editors/micro.nix deleted file mode 100644 index 0618cf1..0000000 --- a/modules/software/editors/micro.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.software.editors.micro; -in { - options.modules.software.editors.micro = { - enable = mkEnableOption "Enable micro, a simple CLI code editor"; - }; - - config = let - schemeName = "generated"; - in mkIf cfg.enable { - environment.variables.EDITOR = "micro"; - - hm.programs.micro = { - enable = true; - settings = { - autosu = true; - clipboard = "external"; - savecursor = true; - scrollbar = true; - tabsize = 2; - tabstospaces = true; - - colorScheme = schemeName; - }; - }; - - hm.home.file.".config/micro/colorschemes/${schemeName}.micro".text = with config.colorScheme.palette; '' - color-link default "#${base05},#${base00}" - color-link comment "#${base03},#${base00}" - color-link identifier "#${base0D},#${base00}" - color-link constant "#${base0E},#${base00}" - color-link constant.string "#E6DB74,#${base00}" - color-link constant.string.char "#BDE6AD,#${base00}" - color-link statement "#${base08},#${base00}" - color-link symbol.operator "#${base08},#${base00}" - color-link preproc "#CB4B16,#${base00}" - color-link type "#${base0D},#${base00}" - color-link special "#${base0B},#${base00}" - color-link underlined "#D33682,#${base00}" - color-link error "bold #CB4B16,#${base00}" - color-link todo "bold #D33682,#${base00}" - color-link hlsearch "#${base00},#E6DB74" - color-link statusline "#${base00},#${base05}" - color-link tabbar "#${base00},#${base05}" - color-link indent-char "#505050,#${base00}" - color-link line-number "#AAAAAA,#${base01}" - color-link current-line-number "#AAAAAA,#${base00}" - color-link diff-added "#00AF00" - color-link diff-modified "#FFAF00" - color-link diff-deleted "#D70000" - color-link gutter-error "#CB4B16,#${base00}" - color-link gutter-warning "#E6DB74,#${base00}" - color-link cursor-line "#${base01}" - color-link color-column "#${base01}" - #No extended types; Plain brackets. - color-link type.extended "default" - #color-link symbol.brackets "default" - color-link symbol.tag "#${base0E},#${base00}" - ''; - }; -} diff --git a/modules/software/editors/vscode.nix b/modules/software/editors/vscode.nix deleted file mode 100644 index b5015ce..0000000 --- a/modules/software/editors/vscode.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; -let - cfg = config.modules.software.editors.vscode; -in { - options.modules.software.editors.vscode = { - enable = mkEnableOption "Enable visual studio code, microsoft's gui code editor + IDE"; - }; - - config = mkIf cfg.enable { - hm.programs.vscode = { - enable = true; - extensions = with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - oderwat.indent-rainbow - usernamehw.errorlens - vadimcn.vscode-lldb - ms-vsliveshare.vsliveshare - ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "discord-vscode"; - publisher = "icrawl"; - version = "5.8.0"; - sha256 = "sha256-IU/looiu6tluAp8u6MeSNCd7B8SSMZ6CEZ64mMsTNmU="; - } - ]; - mutableExtensionsDir = false; - enableExtensionUpdateCheck = false; - enableUpdateCheck = false; - userSettings = with config.modules.desktop.fonts.fonts; { - "editor.fontFamily" = "'${monospace.family}', monospace"; - "editor.fontSize" = monospace.size + 3; # needed?? - - "terminal.integrated.fontFamily" = "\"${monospace.family}\""; - "terminal.integrated.fontSize" = monospace.size + 3; # needed?? - - "telemetry.telemetryLevel" = "off"; - - "editor.tabSize" = 4; - "editor.cursorSmoothCaretAnimation" = "on"; - - "window.dialogStyle" = "custom"; - "window.titleBarStyle" = "custom"; - - "workbench.tips.enabled" = false; - - "nix.enableLanguageServer" = true; - "nix.serverPath" = "${lib.getExe pkgs.nil}"; - - "security.workspace.trust.untrustedFiles" = "open"; - - "explorer.compactFolders" = false; - "explorer.confirmDelete" = false; - "explorer.confirmDragAndDrop" = true; - - "editor.smoothScrolling" = true; - "editor.wordWrap" = "on"; - "editor.wrappingStrategy" = "advanced"; - "editor.fontWeight" = "normal"; - "editor.semanticHighlighting.enabled" = true; - - # prevent vscode from modifying the terminal colors - "terminal.integrated.minimumContrastRatio" = 1; - }; - }; - }; -} diff --git a/modules/software/system/fish.nix b/modules/software/system/fish.nix deleted file mode 100644 index 6f816de..0000000 --- a/modules/software/system/fish.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: - -with lib; -let - cfg = config.modules.software.system.fish; - nix-colors-lib = inputs.nix-colors.lib.contrib { inherit pkgs; }; -in { - options.modules.software.system.fish = { - enable = mkEnableOption "Enable fish, the friendly interpreted shell"; - }; - - config = mkIf cfg.enable { - user.packages = [ pkgs.grc ]; - - environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish tide ]; - - users.defaultUserShell = pkgs.fish; - programs.fish.enable = true; - hm.programs.fish = let - colorScript = nix-colors-lib.shellThemeFromScheme { scheme = config.colorScheme; }; - in { - enable = true; - plugins = [ { name = "grc"; src = pkgs.fishPlugins.grc.src; } ]; - interactiveShellInit = '' - sh ${colorScript} - ''; - # TODO: add fish greeting? - }; - }; -} diff --git a/modules/software/system/wezterm.nix b/modules/software/system/wezterm.nix deleted file mode 100644 index e6740a8..0000000 --- a/modules/software/system/wezterm.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, config, ... }: - -with lib; -let - cfg = config.modules.software.system.wezterm; -in { - options.modules.software.system.wezterm = { - enable = mkEnableOption "Enable wezterm, a blazingly fast terminal emulator"; - }; - - config = mkIf cfg.enable { - environment.variables.TERM = "wezterm"; - - hm.programs.wezterm = { - enable = true; - extraConfig = let - fonts = config.modules.desktop.fonts.fonts; - in '' - local wezterm = require 'wezterm' - - local config = {} - - config.font = wezterm.font '${fonts.monospaceBitmap.family}' - config.font_size = ${toString fonts.monospaceBitmap.size} - config.freetype_load_flags = 'MONOCHROME' - config.enable_wayland = false - config.color_scheme = 'Catppuccin Mocha' - config.use_fancy_tab_bar = false - config.use_resize_increments = true - config.initial_cols = 120 - config.initial_rows = 40 - - config.window_frame = { - font = wezterm.font '${fonts.sansSerif.family}', - font_size = ${toString fonts.sansSerif.size} - } - - return config - ''; - }; - }; -} diff --git a/modules/user.nix b/modules/user.nix index 970ac2d..86a57ed 100644 --- a/modules/user.nix +++ b/modules/user.nix @@ -8,30 +8,22 @@ with lib.my; }; config = { - user = rec { - name = "reidlab"; - description = "reid"; - extraGroups = ["wheel" "input" "audio" "video" "storage"]; - isNormalUser = true; - home = "/home/${name}"; - group = name; - uid = 1000; - }; - users.groups.${config.user.group} = {}; + user = rec { + name = "reidlab"; + description = "awesome guy"; + extraGroups = ["wheel" "input" "audio" "video" "storage"]; + isNormalUser = true; + home = "/home/${name}"; + group = name; + uid = 1000; + }; + users.groups.${config.user.group} = {}; - users.users.${config.user.name} = mkAliasDefinitions options.user; + users.users.${config.user.name} = mkAliasDefinitions options.user; - home-manager.useUserPackages = true; - home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; - hm.home.username = config.user.name; - hm.home.homeDirectory = lib.mkForce config.user.home; - - nix.settings = let - users = ["root" config.user.name]; - in { - trusted-users = users; - allowed-users = users; - }; + hm.home.username = config.user.name; + hm.home.homeDirectory = lib.mkForce config.user.home; }; } diff --git a/modules/xdg.nix b/modules/xdg.nix index 10f9786..7ce9551 100644 --- a/modules/xdg.nix +++ b/modules/xdg.nix @@ -1,19 +1,19 @@ { ... }: { config = { - hm.xdg.enable = true; - hm.xdg.userDirs = { - enable = true; - createDirectories = true; + hm.xdg.enable = true; + hm.xdg.userDirs = { + enable = true; + createDirectories = true; - desktop = "$HOME/desktop"; - documents = "$HOME/documents"; - download = "$HOME/downloads"; - music = "$HOME/music"; - pictures = "$HOME/pictures"; - publicShare = "$HOME/public"; - templates = "$HOME/templates"; - videos = "$HOME/videos"; - }; + desktop = "$HOME/desktop"; + documents = "$HOME/documents"; + download = "$HOME/downloads"; + music = "$HOME/music"; + pictures = "$HOME/pictures"; + publicShare = "$HOME/public"; + templates = "$HOME/templates"; + videos = "$HOME/videos"; + }; }; } diff --git a/packages/.gitkeep b/packages/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/packages/atkinson-hyperlegible-pro/default.nix b/packages/atkinson-hyperlegible-pro/default.nix deleted file mode 100644 index 0301b75..0000000 --- a/packages/atkinson-hyperlegible-pro/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib, stdenvNoCC, fetchFromGitHub }: - -stdenvNoCC.mkDerivation { - pname = "atkinson-hyperlegible-pro"; - version = "1.5.1-unstable"; - - src = fetchFromGitHub { - owner = "jacobxperez"; - repo = "atkinson-hyperlegible-pro"; - rev = "2576e71d09f57eac8d5e7d9d42b9e7ce49f759e1"; - hash = "sha256-Zqr4dwrT/QWpYlNlLCVnWaZ6B5+yQ4Zh5pqYa7NBg3Y="; - }; - - installPhase = '' - runHook preInstall - - install -Dm644 -t $out/share/fonts/opentype fonts/otf/* - - runHook postInstall - ''; - - meta = with lib; { - description = "Maintained version of Atkinson Hyperlegible"; - homepage = "https://jacobxperez.github.io/atkinson-hyperlegible-pro/"; - license = licenses.ofl; - platforms = platforms.all; - }; -} diff --git a/packages/catppuccin-sddm-corners/default.nix b/packages/catppuccin-sddm-corners/default.nix deleted file mode 100644 index d0c15eb..0000000 --- a/packages/catppuccin-sddm-corners/default.nix +++ /dev/null @@ -1,175 +0,0 @@ -{ lib -, stdenvNoCC -, fetchFromGitHub -, writeText -, config ? {} -}: - -let - defaultConfig = { - General = { - ### GENERAL - - # path to the wallpaper. you can drop files in backgrounds/ to use a relative path, or you can just use an absolute path. - Background="backgrounds/flatppuccin_macchiato.png"; - - # the font to use throughout the theme. use the name of the font family. - Font="Liga SFMono Nerd Font"; - - # the distance that stuff should be from the screen edge. - Padding="50"; - - # specify how round corners should be, or set to 0 to disable rounded corners. - CornerRadius="5"; - - # the font size used for everything excluding the date and time. - GeneralFontSize="9"; - - # this allows you to adjust the relative scale of UI elements. you should probably keep the value below 1. - LoginScale="0.175"; - - ### USER PICTURE - - # the width of the outline around the user avatar. set to 0 to disable. - UserPictureBorderWidth="5"; - - # the color of the outline around the user avatar. - UserPictureBorderColor="#c0caf5"; - - # the color of the default, blank avatar. note that this isonly visible when you don't have a custom picture set. - UserPictureColor="#414868"; - - ### TEXT FIELD (USER AND PASSWORD) - - # the color of the text field background for the user and password fields. - TextFieldColor="#414868"; - - # the color of the text inside the user and password fields. - TextFieldTextColor="#c0caf5"; - - # the color of the border around the currently selected text field. - TextFieldHighlightColor="#c0caf5"; - - # the border width of the currently selected text field. set to 0 to disable the border. - TextFieldHighlightWidth="3"; - - # the placeholder text shown in the user field when nothing is typed. - UserFieldBgText="User"; - - # the placeholder text shown in the password field when nothing is typed. - PasswordFieldBgText="Password"; - - ### LOGIN BUTTON - - # the color of the login button text. - LoginButtonTextColor="#414868"; - - # the color of the login button background. - LoginButtonBgColor="#c0caf5"; - - # the text to be displayed on the login button. - LoginButtonText="Login"; - - ### POPUP (POWER, SESSION, AND USER) - - # the background color of the popup. this applies to the power panel, session panel, and user panel. - PopupBgColor="#c0caf5"; - - # the color of the currently selected entry in the popup. this applies to the power panel, session panel, and user panel. - PopupHighlightColor="#414868"; - - # the color of the text for the currently selectedoption. only applies to session and user popups. - PopupHighlightedTextColor="#c0caf5"; - - ### SESSION BUTTON - - # the color of the session button background. - SessionButtonColor="#c0caf5"; - - # the color of the icon inside the session button. - SessionIconColor="#414868"; - - ### POWER BUTTON - - # the color of the power button background. - PowerButtonColor="#c0caf5"; - - # the color of the power button background. - PowerIconColor="#414868"; - - ### DATE - - # the text color of the date. - DateColor="#c0caf5"; - - # the font size of the date. - DateSize="36"; - - # whether the date is bolded. accepts either `true` or `false`. - DateIsBold="false"; - - # whether the date is bolded. accepts either `true` or `false`. - DateOpacity="0.8"; - - # specify the formatting of the date. - DateFormat="dddd, MMMM d"; - - ### TIME - - # the text color of the time. - TimeColor="#c0caf5"; - - # the font size of the time. - TimeSize="48"; - - # whether the time is bolded. accepts either `true` or `false`. - TimeIsBold="true"; - - # the opacity of the time text. set to 1 to disable transparency. - TimeOpacity="0.8"; - - # specify the formatting of the time. - TimeFormat="hh:mm AP"; - }; - }; - mergedConfig = lib.attrsets.recursiveUpdate defaultConfig config; -in stdenvNoCC.mkDerivation { - pname = "catppuccin-sddm-corners"; - version = "unstable-2023-02-17"; - - src = fetchFromGitHub { - owner = "khaneliman"; - repo = "catppuccin-sddm-corners"; - rev = "7b7a86ee9a5a2905e7e6623d2af5922ce890ef79"; - hash = "sha256-sTnt8RarNXz3RmYfmx4rD+nMlY8rr2n0EN3ntPzOurw="; - }; - - dontConfigure = true; - dontBuild = true; - - installPhase = let - configFile = writeText "catppuccin-sddm-corners-theme-conf" (lib.generators.toINI { - # specifies how to format a key/value pair - mkKeyValue = lib.generators.mkKeyValueDefault { - mkValueString = v: ''"${builtins.toString v}"''; - } " = "; - } mergedConfig); - in '' - runHook preInstall - - cp ${configFile} catppuccin/theme.conf - - mkdir -p "$out/share/sddm/themes/" - cp -r catppuccin/ "$out/share/sddm/themes/catppuccin-sddm-corners" - - runHook postInstall - ''; - - meta = { - description = "Soothing pastel theme for SDDM based on corners theme."; - homepage = "https://github.com/khaneliman/sddm-catppuccin-corners"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ khaneliman ]; - platforms = lib.platforms.linux; - }; -} diff --git a/readme.md b/readme.md new file mode 100755 index 0000000..f0b279f --- /dev/null +++ b/readme.md @@ -0,0 +1,14 @@ +# dotfiles + +nix flake config! this is just used on my personal computer + +## users + +this flake is built upon a single user system for all hosts, enforced by [`modules/user.nix`](./modules/user.nix). this makes it alot easier to make moduels that use nixos and `home-manager` + +## todo + +- some weird perl error abt locales when building using doas - `keepEnv` might fix this +- move common config such as bootloader and networking settings to [`default.nix`](./default.nix) +- leverage nixos-hardware +- flake-parts (hopefully we can merge the 2 repositories once we find a user solution)