my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

home/profiles/media: init

isabel 29c6a0f7 c258f177

+244 -227
+176 -192
home/isabel/cli/git.nix
··· 6 6 ... 7 7 }: 8 8 let 9 - inherit (lib) mkIf mkMerge map; 9 + inherit (lib) mkIf map mkMerge; 10 10 inherit (lib.hm.dag) entryBefore; 11 11 inherit (self.lib) giturl; 12 12 in 13 13 { 14 - config = mkIf config.programs.git.enable (mkMerge [ 15 - # (mkIf config.garden.profiles.workstation.enable { 16 - # garden.packages = { 17 - # inherit (pkgs) 18 - # gist # manage github gists 19 - # act # local github actions - littrally does not work 20 - # gitflow # Extend git with the Gitflow branching model 21 - # cocogitto # git helpers 22 - # ; 23 - # }; 24 - # }) 25 - 26 - # `programs.git` will generate the config file: ~/.config/git/config 27 - # to make git use this config file, `~/.gitconfig` should not exist! 28 - (mkIf pkgs.stdenv.hostPlatform.isDarwin { 29 - home.activation = { 30 - removeExistingGitconfig = entryBefore [ "checkLinkTargets" ] '' 31 - rm -f ~/.gitconfig 32 - ''; 33 - }; 34 - }) 14 + sops.secrets.uni-gitconf = { }; 35 15 36 - { 37 - sops.secrets.uni-gitconf = { }; 16 + programs = { 17 + git = { 18 + inherit (config.garden.profiles.workstation) enable; 19 + package = pkgs.gitMinimal; 38 20 39 - programs.git = { 40 - package = pkgs.gitMinimal; 41 - 42 - includes = [ 43 - { 44 - condition = "gitdir:~/dev/uni/"; 45 - inherit (config.sops.secrets."uni-gitconf") path; 46 - } 47 - { 48 - condition = "gitdir:~/Dev/uni/"; 49 - inherit (config.sops.secrets."uni-gitconf") path; 50 - } 51 - ]; 21 + includes = [ 22 + { 23 + condition = "gitdir:~/dev/uni/"; 24 + inherit (config.sops.secrets."uni-gitconf") path; 25 + } 26 + { 27 + condition = "gitdir:~/Dev/uni/"; 28 + inherit (config.sops.secrets."uni-gitconf") path; 29 + } 30 + ]; 52 31 53 - lfs = { 54 - enable = false; 55 - skipSmudge = true; # we don't want another ctp/userstyles situation 56 - }; 32 + lfs = { 33 + enable = false; 34 + skipSmudge = true; # we don't want another ctp/userstyles situation 35 + }; 57 36 58 - # git commit signing 59 - signing = { 60 - format = "ssh"; 61 - key = "${config.home.homeDirectory}/.ssh/id_ed25519.pub"; 62 - signByDefault = true; 63 - }; 37 + # git commit signing 38 + signing = { 39 + format = "ssh"; 40 + key = "${config.home.homeDirectory}/.ssh/id_ed25519.pub"; 41 + signByDefault = true; 42 + }; 64 43 65 - ignores = [ 66 - # system residue 67 - ".cache/" 68 - ".DS_Store" 69 - ".Trashes" 70 - ".Trash-*" 71 - "*.bak" 72 - "*.swp" 73 - "*.swo" 74 - "*.elc" 75 - ".~lock*" 44 + ignores = [ 45 + # system residue 46 + ".cache/" 47 + ".DS_Store" 48 + ".Trashes" 49 + ".Trash-*" 50 + "*.bak" 51 + "*.swp" 52 + "*.swo" 53 + "*.elc" 54 + ".~lock*" 76 55 77 - # build residue 78 - "tmp/" 79 - "target/" 80 - "result" 81 - "result-*" 82 - "*.exe" 83 - "*.exe~" 84 - "*.dll" 85 - "*.so" 86 - "*.dylib" 56 + # build residue 57 + "tmp/" 58 + "target/" 59 + "result" 60 + "result-*" 61 + "*.exe" 62 + "*.exe~" 63 + "*.dll" 64 + "*.so" 65 + "*.dylib" 87 66 88 - # dependencies 89 - ".direnv/" 90 - "node_modules" 91 - "vendor" 92 - ]; 67 + # dependencies 68 + ".direnv/" 69 + "node_modules" 70 + "vendor" 71 + ]; 93 72 94 - settings = { 95 - user = { 96 - name = "isabel"; 97 - email = "isabel" + "@" + "isabelroses" + "." + "com"; # obsfuscate email to prevent webscrapper spam 98 - }; 73 + settings = { 74 + user = { 75 + name = "isabel"; 76 + email = "isabel" + "@" + "isabelroses" + "." + "com"; # obsfuscate email to prevent webscrapper spam 77 + }; 99 78 100 - alias = { 101 - st = "status"; 102 - br = "branch"; 103 - c = "commit -m"; 104 - ca = "commit -am"; 105 - co = "checkout"; 106 - d = "diff"; 107 - df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"; 108 - fuck = "commit --amend -m"; 109 - graph = "log --all --decorate --graph"; 110 - ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"; 111 - pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"; 112 - af = "!git add $(git ls-files -m -o --exclude-standard | fzf -m)"; 113 - hist = '' 114 - log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all 115 - ''; 116 - llog = '' 117 - log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative 118 - ''; 119 - # https://github.com/arichtman/nix/blob/18f5613c2842e12e49350aeceace63863ad59244/modules/home/default-home/default.nix#L11 120 - fuggit = "!git add . && git commit --amend --no-edit && git push --force"; 121 - # thanks @vbde for this 122 - idc = "!git commit -am '$(curl -s https://whatthecommit.com/index.txt)'"; 123 - }; 79 + alias = { 80 + st = "status"; 81 + br = "branch"; 82 + c = "commit -m"; 83 + ca = "commit -am"; 84 + co = "checkout"; 85 + d = "diff"; 86 + df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"; 87 + fuck = "commit --amend -m"; 88 + graph = "log --all --decorate --graph"; 89 + ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"; 90 + pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"; 91 + af = "!git add $(git ls-files -m -o --exclude-standard | fzf -m)"; 92 + hist = '' 93 + log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all 94 + ''; 95 + llog = '' 96 + log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative 97 + ''; 98 + # https://github.com/arichtman/nix/blob/18f5613c2842e12e49350aeceace63863ad59244/modules/home/default-home/default.nix#L11 99 + fuggit = "!git add . && git commit --amend --no-edit && git push --force"; 100 + # thanks @vbde for this 101 + idc = "!git commit -am '$(curl -s https://whatthecommit.com/index.txt)'"; 102 + }; 124 103 125 - init.defaultBranch = "main"; 126 - repack.usedeltabaseoffset = "true"; 127 - color.ui = "auto"; 128 - help.autocorrect = 10; # 1 second warning to a typo'd command 104 + init.defaultBranch = "main"; 105 + repack.usedeltabaseoffset = "true"; 106 + color.ui = "auto"; 107 + help.autocorrect = 10; # 1 second warning to a typo'd command 129 108 130 - diff = { 131 - algorithm = "histogram"; # a much better diff 132 - colorMoved = "plain"; # show moved lines in a different color 133 - mnemonicprefix = true; 134 - }; 109 + diff = { 110 + algorithm = "histogram"; # a much better diff 111 + colorMoved = "plain"; # show moved lines in a different color 112 + mnemonicprefix = true; 113 + }; 135 114 136 - core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol"; 115 + core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol"; 137 116 138 - # nice quality of life improvements 139 - branch = { 140 - autosetupmerge = "true"; 117 + # nice quality of life improvements 118 + branch = { 119 + autosetupmerge = "true"; 141 120 142 - # sorts branches so the newst ones by latest commit are at the top 143 - sort = "committerdate"; 144 - }; 121 + # sorts branches so the newst ones by latest commit are at the top 122 + sort = "committerdate"; 123 + }; 145 124 146 - commit.verbose = true; 125 + commit.verbose = true; 147 126 148 - # prune branches that are no longer on the remote 149 - fetch.prune = true; 127 + # prune branches that are no longer on the remote 128 + fetch.prune = true; 150 129 151 - pull = { 152 - # the default functionality is to push the current branch that i am on to the remote 153 - default = "current"; 130 + pull = { 131 + # the default functionality is to push the current branch that i am on to the remote 132 + default = "current"; 154 133 155 - # equivalent to --ff-only 156 - ff = "only"; 157 - }; 134 + # equivalent to --ff-only 135 + ff = "only"; 136 + }; 158 137 159 - # if a remote does not have a branch that i have, create it 160 - push.autoSetupRemote = true; 138 + # if a remote does not have a branch that i have, create it 139 + push.autoSetupRemote = true; 161 140 162 - # nicer diffing for merges 163 - merge = { 164 - stat = "true"; 165 - conflictstyle = "zdiff3"; 166 - tool = "meld"; 167 - }; 141 + # nicer diffing for merges 142 + merge = { 143 + stat = "true"; 144 + conflictstyle = "zdiff3"; 145 + tool = "meld"; 146 + }; 168 147 169 - rebase = { 170 - # https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/ 171 - updateRefs = true; 148 + rebase = { 149 + # https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/ 150 + updateRefs = true; 172 151 173 - autoSquash = true; 174 - autoStash = true; 175 - }; 152 + autoSquash = true; 153 + autoStash = true; 154 + }; 176 155 177 - rerere = { 178 - enabled = true; 179 - autoupdate = true; 180 - }; 156 + rerere = { 157 + enabled = true; 158 + autoupdate = true; 159 + }; 181 160 182 - # prevent data corruption 183 - transfer.fsckObjects = true; 184 - fetch.fsckObjects = true; 185 - receive.fsckObjects = true; 161 + # prevent data corruption 162 + transfer.fsckObjects = true; 163 + fetch.fsckObjects = true; 164 + receive.fsckObjects = true; 186 165 187 - url = mkMerge ( 188 - map giturl [ 189 - { 190 - domain = "github.com"; 191 - alias = "github"; 192 - } 193 - { 194 - domain = "gitlab.com"; 195 - alias = "gitlab"; 196 - } 197 - { 198 - domain = "aur.archlinux.org"; 199 - alias = "aur"; 200 - user = "aur"; 201 - } 202 - { 203 - domain = "git.sr.ht"; 204 - alias = "srht"; 205 - } 206 - { 207 - domain = "codeberg.org"; 208 - alias = "codeberg"; 209 - } 210 - { 211 - domain = "git.isabelroses.com"; 212 - alias = "me"; 213 - } 214 - ] 215 - ); 216 - }; 166 + url = mkMerge ( 167 + map giturl [ 168 + { 169 + domain = "github.com"; 170 + alias = "github"; 171 + } 172 + { 173 + domain = "gitlab.com"; 174 + alias = "gitlab"; 175 + } 176 + { 177 + domain = "aur.archlinux.org"; 178 + alias = "aur"; 179 + user = "aur"; 180 + } 181 + { 182 + domain = "git.sr.ht"; 183 + alias = "srht"; 184 + } 185 + { 186 + domain = "codeberg.org"; 187 + alias = "codeberg"; 188 + } 189 + { 190 + domain = "git.isabelroses.com"; 191 + alias = "me"; 192 + } 193 + ] 194 + ); 217 195 }; 218 - } 196 + }; 219 197 220 - { 221 - # pager / diff tool 222 - programs.delta = { 223 - enable = true; 224 - enableGitIntegration = true; 198 + # pager / diff tool 199 + delta = { 200 + inherit (config.garden.profiles.workstation) enable; 201 + enableGitIntegration = true; 225 202 226 - options = { 227 - navigate = true; 228 - side-by-side = true; 229 - line-numbers = true; 230 - }; 203 + options = { 204 + navigate = true; 205 + side-by-side = true; 206 + line-numbers = true; 231 207 }; 232 - } 233 - ]); 208 + }; 209 + }; 210 + 211 + # `programs.git` will generate the config file: ~/.config/git/config 212 + # to make git use this config file, `~/.gitconfig` should not exist! 213 + home.activation = mkIf (pkgs.stdenv.hostPlatform.isDarwin && config.programs.git.enable) { 214 + removeExistingGitconfig = entryBefore [ "checkLinkTargets" ] '' 215 + rm -f ~/.gitconfig 216 + ''; 217 + }; 234 218 }
+14
home/isabel/gui/media/creation.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + config, 5 + ... 6 + }: 7 + { 8 + garden.packages = lib.mkIf config.garden.profiles.media.creation.enable { 9 + inherit (pkgs) 10 + inkscape # vector graphics editor 11 + gimp # image editor 12 + ; 13 + }; 14 + }
+1
home/isabel/gui/media/default.nix
··· 1 1 { 2 2 imports = [ 3 3 # keep-sorted start 4 + ./creation.nix 4 5 ./streaming.nix 5 6 ./watching.nix 6 7 # keep-sorted end
+2 -4
home/isabel/gui/media/streaming.nix
··· 4 4 config, 5 5 ... 6 6 }: 7 - let 8 - inherit (config.programs.obs-studio) enable; 9 - in 10 7 { 11 - config = lib.mkIf enable { 8 + config = lib.mkIf config.garden.profiles.media.streaming.enable { 12 9 garden.packages = { 13 10 inherit (pkgs) chatterino7; 14 11 }; 15 12 16 13 programs.obs-studio = { 14 + enable = true; 17 15 package = pkgs.obs-studio.override { 18 16 cudaSupport = true; 19 17 };
+10 -5
home/isabel/gui/media/watching.nix
··· 2 2 lib, 3 3 pkgs, 4 4 config, 5 + inputs', 5 6 ... 6 7 }: 7 - let 8 - enable = config.garden.profiles.graphical.enable && pkgs.stdenv.hostPlatform.isLinux; 9 - in 10 8 { 11 - config = lib.mkIf enable { 9 + config = lib.mkIf config.garden.profiles.media.watching.enable { 12 10 garden.packages = { 13 - inherit (pkgs) syncplay yt-dlp ffmpeg; 11 + inherit (pkgs) 12 + syncplay 13 + yt-dlp 14 + ffmpeg 15 + playerctl 16 + ; 17 + 18 + inherit (inputs'.tgirlpkgs.packages) tidaluna; 14 19 }; 15 20 16 21 programs.mpv = {
+10 -15
home/isabel/packages.nix
··· 16 16 (optionalAttrs cfg.workstation.enable { 17 17 inherit (pkgs) 18 18 # keep-sorted start 19 - # wishlist # fancy ssh 20 19 glow # fancy markdown 21 - # fx # fancy jq 22 20 # gum # a nicer scripting 23 21 jq # json parser 24 22 just # cool build tool ··· 33 31 inherit (inputs'.tgirlpkgs.packages) zzz; # code snippets in the cli 34 32 }) 35 33 36 - (optionalAttrs cfg.graphical.enable { 37 - inherit (pkgs) 38 - # keep-sorted start 39 - manga-tui # tui manga finder + reader 40 - # bitwarden-cli # bitwarden, my chosen password manager 41 - # vhs # programmatically make gifs 42 - # keep-sorted end 43 - ; 44 - }) 34 + # (optionalAttrs cfg.graphical.enable { 35 + # inherit (pkgs) 36 + # # keep-sorted start 37 + # # manga-tui # tui manga finder + reader 38 + # # bitwarden-cli # bitwarden, my chosen password manager 39 + # # vhs # programmatically make gifs 40 + # # keep-sorted end 41 + # ; 42 + # }) 45 43 46 44 (optionalAttrs (cfg.graphical.enable && isLinux) { 47 45 inherit (pkgs) ··· 49 47 brightnessctl # brightness managed via cli 50 48 grim 51 49 libnotify # needed for some notifications 52 - playerctl 53 50 pwvucontrol 54 51 signal-desktop 55 52 slurp 56 53 # bitwarden-desktop # password manager 57 54 # jellyfin-media-player 58 55 # insomnia # rest client 59 - # inkscape # vector graphics editor 60 - # gimp # image editor 61 56 swappy # used for screenshot area selection 62 57 wl-clipboard 63 58 wl-gammactl 64 59 # keep-sorted end 65 60 ; 66 61 67 - inherit (inputs'.tgirlpkgs.packages) tidaluna cake-wallet; 62 + inherit (inputs'.tgirlpkgs.packages) cake-wallet; 68 63 }) 69 64 ]; 70 65 }
+26 -11
modules/home/profiles.nix
··· 1 - { lib, osConfig, ... }: 1 + { 2 + lib, 3 + config, 4 + osClass, 5 + osConfig, 6 + ... 7 + }: 2 8 let 3 - cfg = osConfig.garden.profiles; 9 + inherit (lib) mkEnableOption; 4 10 in 5 11 { 6 - garden.profiles = { 7 - inherit (cfg) 8 - graphical 9 - headless 10 - workstation 11 - laptop 12 - server 13 - ; 12 + options.garden.profiles.media = { 13 + creation.enable = mkEnableOption "media creation profile"; 14 + streaming.enable = mkEnableOption "media streaming profile"; 15 + 16 + watching.enable = mkEnableOption "media watching profile" // { 17 + default = config.garden.profiles.graphical.enable && osClass == "nixos"; 18 + }; 14 19 }; 15 20 16 - programs.git.enable = lib.mkDefault cfg.workstation.enable; 21 + config = { 22 + garden.profiles = { 23 + inherit (osConfig.garden.profiles) 24 + graphical 25 + headless 26 + workstation 27 + laptop 28 + server 29 + ; 30 + }; 31 + }; 17 32 }
+5
systems/amaterasu/users.nix
··· 9 9 hyprland.enable = true; 10 10 quickshell.enable = true; 11 11 }; 12 + 13 + garden.profiles.media = { 14 + creation.enable = true; 15 + streaming.enable = true; 16 + }; 12 17 }; 13 18 }