From d24cf9cd6c861192693c334db4e2a44f58e3ad01 Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 30 Jun 2023 23:36:28 +0900 Subject: [PATCH] Add dconf settings --- laptop/dconf.nix | 252 ++++++++++++++++++++++++++- laptop/home-manager.nix | 8 +- laptop/home-manager/dotfiles/git.nix | 134 -------------- laptop/home-manager/dotfiles/vim.nix | 25 --- laptop/home-manager/flake.nix | 26 --- laptop/home-manager/home.nix | 4 - 6 files changed, 249 insertions(+), 200 deletions(-) delete mode 100644 laptop/home-manager/dotfiles/git.nix delete mode 100644 laptop/home-manager/dotfiles/vim.nix delete mode 100644 laptop/home-manager/flake.nix delete mode 100644 laptop/home-manager/home.nix diff --git a/laptop/dconf.nix b/laptop/dconf.nix index 6a0f6c37..4837a393 100644 --- a/laptop/dconf.nix +++ b/laptop/dconf.nix @@ -1,8 +1,244 @@ - dconf.settings = { - "org/gnome/calculator" = { - button-mode = "programming"; - show-thousands = true; - base = 10; - word-size = 64; - window-position = lib.hm.gvariant.mkTuple [100 100]; - }; \ No newline at end of file +# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix +{ lib, ... }: + +with lib.hm.gvariant; + +{ + dconf.settings = { + "org/gnome/Console" = { + theme = "auto"; + }; + + "org/gnome/GWeather4" = { + temperature-unit = "centigrade"; + }; + + "org/gnome/Weather" = { + locations = "[<(uint32 2, <('Osaka International Airport', 'RJOO', false, [(0.60708368566759674, 2.3640484718263193)], @a(dd) [])>)>]"; + }; + + "org/gnome/clocks" = { + world-clocks = "[{'location': <(uint32 2, <('Los Angeles', 'KCQT', true, [(0.59370283970450188, -2.0644336110828618)], [(0.59432360095955872, -2.063741622941031)])>)>}, {'location': <(uint32 2, <('Dallas', 'KDAL', true, [(0.57338429251143708, -1.690448351049749)], [(0.57217226606568217, -1.6895950770317414)])>)>}, {'location': <(uint32 2, <('Washington', 'KDCA', true, [(0.67803131976116615, -1.3444998506811625)], [(0.67884776733195662, -1.344538230471414)])>)>}, {'location': <(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>}]"; + }; + + "org/gnome/clocks/state/window" = { + maximized = false; + panel-id = "world"; + size = mkTuple [ 870 690 ]; + }; + + "org/gnome/control-center" = { + last-panel = "background"; + window-state = mkTuple [ 980 847 ]; + }; + + "org/gnome/desktop/app-folders" = { + folder-children = [ "Utilities" "YaST" ]; + }; + + "org/gnome/desktop/app-folders/folders/Utilities" = { + apps = [ "gnome-abrt.desktop" "gnome-system-log.desktop" "nm-connection-editor.desktop" "org.gnome.baobab.desktop" "org.gnome.Connections.desktop" "org.gnome.DejaDup.desktop" "org.gnome.Dictionary.desktop" "org.gnome.DiskUtility.desktop" "org.gnome.eog.desktop" "org.gnome.Evince.desktop" "org.gnome.FileRoller.desktop" "org.gnome.fonts.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.tweaks.desktop" "org.gnome.Usage.desktop" "vinagre.desktop" ]; + categories = [ "X-GNOME-Utilities" ]; + name = "X-GNOME-Utilities.directory"; + translate = true; + }; + + "org/gnome/desktop/app-folders/folders/YaST" = { + categories = [ "X-SuSE-YaST" ]; + name = "suse-yast.directory"; + translate = true; + }; + + "org/gnome/desktop/background" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = "file:///nix/store/4x0rqlvhvrzkbdigdr9mrgrb40cb52df-simple-blue-2016-02-19/share/backgrounds/nixos/nix-wallpaper-simple-blue.png"; + picture-uri-dark = "file:///nix/store/81y0y8fl92izwbj47aj2d8f48hgsp3wn-simple-dark-gray-2016-02-19/share/backgrounds/nixos/nix-wallpaper-simple-dark-gray.png"; + primary-color = "#3a4ba0"; + secondary-color = "#2f302f"; + }; + + "org/gnome/desktop/input-sources" = { + sources = [ (mkTuple [ "xkb" "us" ]) ]; + xkb-options = [ "terminate:ctrl_alt_bksp" ]; + }; + + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + font-antialiasing = "grayscale"; + font-hinting = "slight"; + }; + + "org/gnome/desktop/notifications" = { + application-children = [ "gnome-power-panel" "bitwarden" "firefox" ]; + show-banners = false; + }; + + "org/gnome/desktop/notifications/application/bitwarden" = { + application-id = "bitwarden.desktop"; + }; + + "org/gnome/desktop/notifications/application/firefox" = { + application-id = "firefox.desktop"; + }; + + "org/gnome/desktop/notifications/application/gnome-power-panel" = { + application-id = "gnome-power-panel.desktop"; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + + "org/gnome/desktop/screensaver" = { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = "file:///nix/store/4x0rqlvhvrzkbdigdr9mrgrb40cb52df-simple-blue-2016-02-19/share/backgrounds/nixos/nix-wallpaper-simple-blue.png"; + primary-color = "#3a4ba0"; + secondary-color = "#2f302f"; + }; + + "org/gnome/desktop/wm/keybindings" = { + maximize = []; + unmaximize = []; + }; + + "org/gnome/desktop/wm/preferences" = { + button-layout = "appmenu:minimize,maximize,close"; + }; + + "org/gnome/evolution-data-server" = { + migrated = true; + }; + + "org/gnome/gnome-system-monitor" = { + cpu-colors = [ (mkTuple [ mkUint32 0 "#e6194B" ]) (mkTuple [ 1 "#f58231" ]) (mkTuple [ 2 "#ffe119" ]) (mkTuple [ 3 "#bfef45" ]) (mkTuple [ 4 "#3cb44b" ]) (mkTuple [ 5 "#42d4f4" ]) (mkTuple [ 6 "#4363d8" ]) (mkTuple [ 7 "#911eb4" ]) (mkTuple [ 8 "#f032e6" ]) (mkTuple [ 9 "#fabebe" ]) (mkTuple [ 10 "#ffd8b1" ]) (mkTuple [ 11 "#fffac8" ]) (mkTuple [ 12 "#aaffc3" ]) (mkTuple [ 13 "#469990" ]) (mkTuple [ 14 "#000075" ]) (mkTuple [ 15 "#e6beff" ]) (mkTuple [ 16 "#d4867999f332" ]) (mkTuple [ 17 "#7999f332b10b" ]) (mkTuple [ 18 "#f3328d907999" ]) (mkTuple [ 19 "#7999891df332" ]) ]; + current-tab = "disks"; + maximized = false; + network-total-in-bits = false; + show-dependencies = false; + show-whose-processes = "user"; + window-state = mkTuple [ 850 649 ]; + }; + + "org/gnome/gnome-system-monitor/disktreenew" = { + col-6-visible = true; + col-6-width = 0; + }; + + "org/gnome/mutter" = { + edge-tiling = false; + }; + + "org/gnome/mutter/keybindings" = { + toggle-tiled-left = []; + toggle-tiled-right = []; + }; + + "org/gnome/nautilus/preferences" = { + migrated-gtk-settings = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + night-light-enabled = true; + }; + + "org/gnome/shell" = { + app-picker-layout = "[{'org.gnome.Extensions.desktop': <{'position': <0>}>, 'htop.desktop': <{'position': <1>}>, 'nixos-manual.desktop': <{'position': <2>}>, 'nvidia-settings.desktop': <{'position': <3>}>, 'vlc.desktop': <{'position': <4>}>, 'xterm.desktop': <{'position': <5>}>, 'org.gnome.Settings.desktop': <{'position': <6>}>, 'org.gnome.Calculator.desktop': <{'position': <7>}>, 'org.gnome.clocks.desktop': <{'position': <8>}>, 'org.gnome.Contacts.desktop': <{'position': <9>}>, 'simple-scan.desktop': <{'position': <10>}>, 'yelp.desktop': <{'position': <11>}>, 'org.gnome.Calendar.desktop': <{'position': <12>}>, 'gnome-system-monitor.desktop': <{'position': <13>}>, 'org.gnome.TextEditor.desktop': <{'position': <14>}>, 'Utilities': <{'position': <15>}>, 'org.gnome.Weather.desktop': <{'position': <16>}>, 'org.gnome.Photos.desktop': <{'position': <17>}>}]"; + disabled-extensions = [ "workspace-indicator@gnome-shell-extensions.gcampax.github.com" ]; + enabled-extensions = [ "blur-my-shell@aunetx" "caffeine@patapon.info" "dash-to-dock@micxgx.gmail.com" "user-theme@gnome-shell-extensions.gcampax.github.com" "Vitals@CoreCoding.com" "tiling-assistant@leleat-on-github" ]; + favorite-apps = [ "org.gnome.Nautilus.desktop" "firefox.desktop" "org.gnome.Console.desktop" "bitwarden.desktop" "steam.desktop" "net.lutris.Lutris.desktop" ]; + welcome-dialog-last-shown-version = "44.2"; + }; + + "org/gnome/shell/extensions/caffeine" = { + indicator-position-max = 3; + }; + + "org/gnome/shell/extensions/dash-to-dock" = { + apply-custom-theme = false; + background-opacity = 0.8; + custom-theme-shrink = true; + dance-urgent-applications = true; + dash-max-icon-size = 40; + disable-overview-on-startup = true; + dock-position = "BOTTOM"; + height-fraction = 0.9; + icon-size-fixed = false; + isolate-workspaces = false; + preferred-monitor = -2; + preferred-monitor-by-connector = "eDP-1"; + show-icons-emblems = true; + show-icons-notifications-counter = true; + show-show-apps-button = false; + show-windows-preview = true; + transparency-mode = "FIXED"; + }; + + "org/gnome/shell/extensions/tiling-assistant" = { + activate-layout0 = []; + activate-layout1 = []; + activate-layout2 = []; + activate-layout3 = []; + active-window-hint = 1; + active-window-hint-color = "rgb(53,132,228)"; + auto-tile = []; + center-window = []; + debugging-free-rects = []; + debugging-show-tiled-rects = []; + default-move-mode = 0; + dynamic-keybinding-behavior = 0; + enable-raise-tile-group = false; + import-layout-examples = false; + last-version-installed = 40; + overridden-settings = "{'org.gnome.mutter.edge-tiling': <@mb nothing>, 'org.gnome.desktop.wm.keybindings.maximize': <@mb nothing>, 'org.gnome.desktop.wm.keybindings.unmaximize': <@mb nothing>, 'org.gnome.mutter.keybindings.toggle-tiled-left': <@mb nothing>, 'org.gnome.mutter.keybindings.toggle-tiled-right': <@mb nothing>}"; + restore-window = [ "Down" ]; + search-popup-layout = []; + single-screen-gap = 20; + tile-bottom-half = [ "KP_2" ]; + tile-bottom-half-ignore-ta = []; + tile-bottomleft-quarter = [ "KP_1" ]; + tile-bottomleft-quarter-ignore-ta = []; + tile-bottomright-quarter = [ "KP_3" ]; + tile-bottomright-quarter-ignore-ta = []; + tile-edit-mode = [ "t" ]; + tile-left-half = [ "Left" "KP_4" ]; + tile-left-half-ignore-ta = []; + tile-maximize = [ "Up" "KP_5" ]; + tile-maximize-horizontally = []; + tile-maximize-vertically = []; + tile-right-half = [ "Right" "KP_6" ]; + tile-right-half-ignore-ta = []; + tile-top-half = [ "KP_8" ]; + tile-top-half-ignore-ta = []; + tile-topleft-quarter = [ "KP_7" ]; + tile-topleft-quarter-ignore-ta = []; + tile-topright-quarter = [ "KP_9" ]; + tile-topright-quarter-ignore-ta = []; + toggle-always-on-top = []; + toggle-tiling-popup = []; + window-gap = 20; + }; + + "org/gnome/shell/extensions/vitals" = { + hot-sensors = [ "_memory_usage_" "_system_load_1m_" "__network-rx_max__" "_battery_rate_" "_battery_state_" "_battery_time_left_" ]; + show-battery = true; + show-voltage = false; + }; + + "org/gnome/shell/weather" = { + automatic-location = true; + locations = "[<(uint32 2, <('Osaka International Airport', 'RJOO', false, [(0.60708368566759674, 2.3640484718263193)], @a(dd) [])>)>]"; + }; + + "org/gnome/shell/world-clocks" = { + locations = "[<(uint32 2, <('Los Angeles', 'KCQT', true, [(0.59370283970450188, -2.0644336110828618)], [(0.59432360095955872, -2.063741622941031)])>)>, <(uint32 2, <('Dallas', 'KDAL', true, [(0.57338429251143708, -1.690448351049749)], [(0.57217226606568217, -1.6895950770317414)])>)>, <(uint32 2, <('Washington', 'KDCA', true, [(0.67803131976116615, -1.3444998506811625)], [(0.67884776733195662, -1.344538230471414)])>)>, <(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>]"; + }; + + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + + }; +} diff --git a/laptop/home-manager.nix b/laptop/home-manager.nix index f32970aa..b5b935ae 100644 --- a/laptop/home-manager.nix +++ b/laptop/home-manager.nix @@ -17,8 +17,10 @@ }; }; - # dconf settings: - # https://github.com/gvolpe/dconf2nix + # dconf settings: + # https://github.com/gvolpe/dconf2nix + imports = [ ./dconf.nix ]; + }; @@ -28,7 +30,7 @@ programs.git = { enable = true; userName = "albert"; - userEmail = "albert@sysctl.io000"; + userEmail = "albert@sysctl.io"; extraConfig = { credential.helper = "cache --timeout=25920000"; }; diff --git a/laptop/home-manager/dotfiles/git.nix b/laptop/home-manager/dotfiles/git.nix deleted file mode 100644 index ce89bde6..00000000 --- a/laptop/home-manager/dotfiles/git.nix +++ /dev/null @@ -1,134 +0,0 @@ -{ - programs.git = { - enable = true; - userName = "albert"; - userEmail = "albert@sysctl.io"; - extraConfig = { - credential.helper = "cache --timeout=25920000"; - alias.a = "add --all"; - alias.ai = "add -i"; - alias.ap = "apply"; - alias.as = "apply --stat"; - alias.ac = "apply --check"; - alias.ama = "am --abort"; - alias.amr = "am --resolved"; - alias.ams = "am --skip"; - alias.b = "branch"; - alias.ba = "branch -a"; - alias.bd = "branch -d"; - alias.bdd = "branch -D"; - alias.br = "branch -r"; - alias.bc = "rev-parse --abbrev-ref HEAD"; - alias.c = "commit"; - alias.ca = "commit -a"; - alias.cm = "commit -m"; - alias.cam = "commit -am"; - alias.cem = "commit --allow-empty -m"; - alias.cd = "commit --amend"; - alias.cad = "commit -a --amend"; - alias.ced = "commit --allow-empty --amend"; - alias.cl = "clone"; - alias.cld = "clone --depth 1"; - alias.cp = "cherry-pick"; - alias.cpa = "cherry-pick --abort"; - alias.cpc = "cherry-pick --continue"; - alias.d = "diff"; - alias.dp = "diff --patience"; - alias.dc = "diff --cached"; - alias.dk = "diff --check"; - alias.dck = "diff --cached --check"; - alias.dt = "difftool"; - alias.dct = "difftool --cached"; - alias.f = "fetch"; - alias.fo = "fetch origin"; - alias.fu = "fetch upstream"; - alias.fp = "format-patch"; - alias.fk = "fsck"; - alias.g = "grep -p"; - alias.l = "log --oneline"; - alias.lg = "log --oneline --graph --decorate"; - alias.ls = "ls-files"; - alias.lsf = "!git ls-files | grep -i"; - alias.m = "merge"; - alias.ma = "merge --abort"; - alias.mc = "merge --continue"; - alias.ms = "merge --skip"; - alias.o = "checkout"; - alias.ob = "checkout -b"; - alias.pr = "prune -v"; - alias.ps = "push"; - alias.psf = "push -f"; - alias.psu = "push -u"; - alias.pst = "push --tags"; - alias.pso = "push origin"; - alias.psao = "push --all origin"; - alias.psfo = "push -f origin"; - alias.psuo = "push -u origin"; - alias.psom = "push origin master"; - alias.psaom = "push --all origin master"; - alias.psfom = "push -f origin master"; - alias.psuom = "push -u origin master"; - alias.psoc = "!git push origin $(git bc)"; - alias.psaoc = "!git push --all origin $(git bc)"; - alias.psfoc = "!git push -f origin $(git bc)"; - alias.psuoc = "!git push -u origin $(git bc)"; - alias.psdc = "!git push origin :$(git bc)"; - alias.pl = "pull"; - alias.pb = "pull --rebase"; - alias.plo = "pull origin"; - alias.pbo = "pull --rebase origin"; - alias.plom = "pull origin master"; - alias.ploc = "!git pull origin $(git bc)"; - alias.pbom = "pull --rebase origin master"; - alias.pboc = "!git pull --rebase origin $(git bc)"; - alias.plu = "pull upstream"; - alias.plum = "pull upstream master"; - alias.pluc = "!git pull upstream $(git bc)"; - alias.pbum = "pull --rebase upstream master"; - alias.pbuc = "!git pull --rebase upstream $(git bc)"; - alias.rb = "rebase"; - alias.rba = "rebase --abort"; - alias.rbc = "rebase --continue"; - alias.rbi = "rebase --interactive"; - alias.rbs = "rebase --skip"; - alias.re = "reset"; - alias.rh = "reset HEAD"; - alias.reh = "reset --hard"; - alias.rem = "reset --mixed"; - alias.res = "reset --soft"; - alias.rehh = "reset --hard HEAD"; - alias.remh = "reset --mixed HEAD"; - alias.resh = "reset --soft HEAD"; - alias.r = "remote"; - alias.ra = "remote add"; - alias.rr = "remote rm"; - alias.rv = "remote -v"; - alias.rn = "remote rename"; - alias.rp = "remote prune"; - alias.rs = "remote show"; - alias.rao = "remote add origin"; - alias.rau = "remote add upstream"; - alias.rro = "remote remove origin"; - alias.rru = "remote remove upstream"; - alias.rso = "remote show origin"; - alias.rsu = "remote show upstream"; - alias.rpo = "remote prune origin"; - alias.rpu = "remote prune upstream"; - alias.rmf = "rm -f"; - alias.rmrf = "rm -r -f"; - alias.s = "status"; - alias.sb = "status -s -b"; - alias.sa = "stash apply"; - alias.sc = "stash clear"; - alias.sd = "stash drop"; - alias.sl = "stash list"; - alias.sp = "stash pop"; - alias.ss = "stash save"; - alias.sw = "stash show"; - alias.t = "tag"; - alias.td = "tag -d"; - alias.w = "show"; - alias.wp = "show -p"; - alias.wr = "show -p --no-color"; - }; -} \ No newline at end of file diff --git a/laptop/home-manager/dotfiles/vim.nix b/laptop/home-manager/dotfiles/vim.nix deleted file mode 100644 index c63ffd14..00000000 --- a/laptop/home-manager/dotfiles/vim.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - environment.systemPackages = [ - (pkgs.vim_configurable.customize { - vimrcConfig.customRc = '' - set nocompatible - filetype on - syntax on - set number - set cursorline - set cursorcolumn - set nowrap - set expandtab - set tabstop=2 - set shiftwidth=2 - set incsearch - set ignorecase - set hlsearch - set history=1000 - set wildmenu - set wildmode=list:longest - set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx - ''; - }) - ]; -} \ No newline at end of file diff --git a/laptop/home-manager/flake.nix b/laptop/home-manager/flake.nix deleted file mode 100644 index 414dc733..00000000 --- a/laptop/home-manager/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "NixOS configuration"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; - home-manager.url = "github:nix-community/home-manager/release-23.05"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = inputs@{ nixpkgs, home-manager, ... }: { - nixosConfigurations = { - hostname = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = false; - home-manager.users.albert = import ./home.nix; - } - ]; - }; - }; - }; -} \ No newline at end of file diff --git a/laptop/home-manager/home.nix b/laptop/home-manager/home.nix deleted file mode 100644 index c7e32dfc..00000000 --- a/laptop/home-manager/home.nix +++ /dev/null @@ -1,4 +0,0 @@ - imports = [ - ./dotfiles/git.nix - ./dotfiles/vim.nix - ]; \ No newline at end of file