From a763c63de414743f07091abf6ac40d9d75053326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 19 Apr 2019 03:11:51 +0200 Subject: [PATCH] modularize --- configs/bash.nix | 9 + configs/bluetooth.nix | 12 + configs/cloud.nix | 34 +++ configs/compton.nix | 8 + configs/default.nix | 368 ++++++++++++++++++++++++++ configs/docker.nix | 4 + configs/dunst.nix | 62 +++++ configs/git.nix | 31 +++ configs/graphics.nix | 94 ------- configs/haskell.nix | 40 +++ configs/htop.nix | 35 +++ configs/i3.nix | 175 ++++++++++++ configs/kdeconnect.nix | 13 + configs/keyboard.nix | 11 + configs/mpv.nix | 17 ++ configs/nano.nix | 10 + configs/{editors.nix => neovim.nix} | 45 +--- configs/networks.nix | 101 ------- configs/packages.nix | 234 ---------------- configs/printing.nix | 9 + configs/python.nix | 18 ++ configs/redshift.nix | 7 + configs/rofi.nix | 40 +++ configs/scripts.nix | 122 --------- configs/ssh.nix | 59 +++++ configs/theming.nix | 35 +++ configs/tmux.nix | 33 +++ configs/unclutter.nix | 6 + configs/urxvt.nix | 27 ++ configs/vscode.nix | 10 + configs/xautolock.nix | 16 ++ {dot => configs}/xresources.nix | 14 +- configs/{shells.nix => zsh.nix} | 56 +--- deploy.nix | 16 +- dot/dunst.nix | 45 ---- dot/ghci.nix | 11 - dot/i3.nix | 177 ------------- dot/mpv.nix | 10 - dot/rofi.nix | 38 --- dot/stack.nix | 9 - dot/tmux.nix | 27 -- dot/urxvt.nix | 24 -- dot/vimrc | 2 +- modules/constants.nix | 39 +++ modules/default.nix | 9 + modules/defaultApplications.nix | 44 --- modules/dropbox.nix | 15 ++ modules/google-drive.nix | 31 +++ modules/seafile.nix | 14 + packages/font-size.nix | 26 ++ packages/genius.nix | 22 ++ packages/instaget.nix | 13 + packages/n.nix | 2 + packages/nix-git.nix | 4 + packages/wttr.nix | 4 + systems/generic.nix | 121 --------- systems/homeros/configuration.nix | 18 +- systems/scardanelli/configuration.nix | 13 +- 58 files changed, 1317 insertions(+), 1172 deletions(-) create mode 100644 configs/bash.nix create mode 100644 configs/bluetooth.nix create mode 100644 configs/cloud.nix create mode 100644 configs/compton.nix create mode 100644 configs/default.nix create mode 100644 configs/docker.nix create mode 100644 configs/dunst.nix create mode 100644 configs/git.nix delete mode 100644 configs/graphics.nix create mode 100644 configs/haskell.nix create mode 100644 configs/htop.nix create mode 100644 configs/i3.nix create mode 100644 configs/kdeconnect.nix create mode 100644 configs/keyboard.nix create mode 100644 configs/mpv.nix create mode 100644 configs/nano.nix rename configs/{editors.nix => neovim.nix} (65%) delete mode 100644 configs/networks.nix delete mode 100644 configs/packages.nix create mode 100644 configs/printing.nix create mode 100644 configs/python.nix create mode 100644 configs/redshift.nix create mode 100644 configs/rofi.nix delete mode 100644 configs/scripts.nix create mode 100644 configs/ssh.nix create mode 100644 configs/theming.nix create mode 100644 configs/tmux.nix create mode 100644 configs/unclutter.nix create mode 100644 configs/urxvt.nix create mode 100644 configs/vscode.nix create mode 100644 configs/xautolock.nix rename {dot => configs}/xresources.nix (65%) rename configs/{shells.nix => zsh.nix} (54%) delete mode 100644 dot/dunst.nix delete mode 100644 dot/ghci.nix delete mode 100644 dot/i3.nix delete mode 100644 dot/mpv.nix delete mode 100644 dot/rofi.nix delete mode 100644 dot/stack.nix delete mode 100644 dot/tmux.nix delete mode 100644 dot/urxvt.nix create mode 100644 modules/constants.nix create mode 100644 modules/default.nix delete mode 100644 modules/defaultApplications.nix create mode 100644 modules/dropbox.nix create mode 100644 modules/google-drive.nix create mode 100644 modules/seafile.nix create mode 100644 packages/font-size.nix create mode 100644 packages/genius.nix create mode 100644 packages/instaget.nix create mode 100644 packages/n.nix create mode 100644 packages/nix-git.nix create mode 100644 packages/wttr.nix delete mode 100644 systems/generic.nix diff --git a/configs/bash.nix b/configs/bash.nix new file mode 100644 index 0000000..e9d6de0 --- /dev/null +++ b/configs/bash.nix @@ -0,0 +1,9 @@ +{ + programs.bash = { + promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "''; + interactiveShellInit = '' + set -o vi + ''; + enableCompletion = true; + }; +} diff --git a/configs/bluetooth.nix b/configs/bluetooth.nix new file mode 100644 index 0000000..35fcf05 --- /dev/null +++ b/configs/bluetooth.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + hardware.bluetooth = { + enable = true; + extraConfig = '' + [General] + Enable=Source,Sink,Media,Socket + ''; + }; + + environment.systemPackages = [ pkgs.blueman ]; +} diff --git a/configs/cloud.nix b/configs/cloud.nix new file mode 100644 index 0000000..ea675fe --- /dev/null +++ b/configs/cloud.nix @@ -0,0 +1,34 @@ +{ config, pkgs, ... }: +{ + imports = [ + + + + ]; + + niveum.dropbox.enable = true; + + niveum.seafile.enable = true; + + niveum.google-drive = { + enable = true; + directory = "${config.users.users.me.home}/cloud/gdrive"; + user = config.users.users.me; + }; + + services.syncthing = rec { + enable = true; + # user = config.users.users.me.name; + # dataDir = "${config.users.users.me.home}/.config/syncthing"; + user = "kfm"; + dataDir = "/home/${user}/.config/syncthing"; + openDefaultPorts = true; + }; + + home-manager.users.me = { + services.syncthing = { + enable = true; + tray = true; + }; + }; +} diff --git a/configs/compton.nix b/configs/compton.nix new file mode 100644 index 0000000..6a0b5bf --- /dev/null +++ b/configs/compton.nix @@ -0,0 +1,8 @@ +{ + services.compton = { + enable = true; + shadow = true; + menuOpacity = "0.9"; + shadowOpacity = "0.3"; + }; +} diff --git a/configs/default.nix b/configs/default.nix new file mode 100644 index 0000000..4d64f7e --- /dev/null +++ b/configs/default.nix @@ -0,0 +1,368 @@ +{ pkgs, lib, config, ... }: +let + theme = import ; + unstable = import {}; +in { + imports = [ + + { + services.dbus.packages = [ pkgs.gnome3.dconf ]; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + niveum.user = { + github = "kmein"; + email = "kieran.meinhardt@gmail.com"; + name = "Kierán Meinhardt"; + }; + + niveum.applications = rec { + terminal = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc"; + browser = "${pkgs.chromium}/bin/chromium"; + fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger"; + }; + + niveum.theme = { + gtk = { name = "Arc"; package = pkgs.arc-theme; }; + icon = { name = "Arc"; package = pkgs.arc-icon-theme; }; + cursor = { name = "capitaine-cursors"; package = pkgs.capitaine-cursors; }; + }; + } + { + nixpkgs.overlays = [ (import ) ]; + nixpkgs.config = { + allowUnfree = true; + packageOverrides = pkgs: { + autorenkalender = pkgs.callPackage {}; + bvg = pkgs.callPackage {}; + daybook = pkgs.callPackage {}; + font-size = pkgs.callPackage { font = theme.terminalFont; }; + genius = pkgs.callPackage {}; + instaget = pkgs.callPackage {}; + instaloader = pkgs.python3Packages.callPackage {}; + iolanguage = pkgs.callPackage {}; + literature-quote = pkgs.callPackage {}; + nix-git = pkgs.callPackage {}; + sncli = pkgs.python3Packages.callPackage {}; + spotify-cli-linux = pkgs.python3Packages.callPackage {}; + todoist = pkgs.callPackage {}; + wttr = pkgs.callPackage {}; + n = pkgs.callPackage {}; + + dic = pkgs.callPackage {}; + yt-next = pkgs.callPackage {}; + acronym = pkgs.callPackage {}; + urban = pkgs.callPackage {}; + mpv-poll = pkgs.callPackage {}; + }; + }; + } + { + boot.cleanTmpDir = true; + boot.loader.timeout = 1; + boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ]; + } + { + time.timeZone = "Europe/Berlin"; + } + { + security.sudo = { + enable = true; + extraConfig = '' + Defaults pwfeedback + ''; + }; + } + { + home-manager.users.me = { + services.random-background = { + enable = true; + imageDirectory = toString ; + interval = "2h"; + }; + }; + } + { + home-manager.users.me = { + programs.zathura = { + enable = true; + options.selection-clipboard = "clipboard"; + }; + }; + } + { + users.mutableUsers = false; + + users.users.me = { + name = "kfm"; + description = "Kierán Meinhardt"; + home = "/home/kfm"; + createHome = true; + group = "users"; + extraGroups = [ "wheel" ]; + hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; + shell = pkgs.zsh; + }; + } + { + sound.enable = true; + + hardware.pulseaudio = { + enable = true; + package = pkgs.pulseaudioFull; # for bluetooth sound output + }; + + users.users.me.extraGroups = [ "audio" ]; + + environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ]; + } + { + environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin"; + environment.shellAliases = { + clipboard = "${pkgs.xclip}/bin/xclip -se c"; + o = "${pkgs.xdg_utils}/bin/xdg-open"; + tmux = "${pkgs.tmux}/bin/tmux -2"; + ip = "${pkgs.iproute}/bin/ip -c"; + ns = "nix-shell --run zsh"; + nixi = ''nix repl ""''; + grep = "grep --color=auto"; + rm = "rm -i"; + cp = "cp -i"; + mv = "mv -i"; + l = "${pkgs.exa}/bin/exa -a"; + ls = "${pkgs.exa}/bin/exa"; + ll = "${pkgs.exa}/bin/exa -l"; + la = "${pkgs.exa}/bin/exa -la"; + niveum-update = "nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-18.09 > ~niveum/nixpkgs.json"; + }; + } + { + networking.wireless = { + enable = true; + userControlled.enable = true; + networks = { + Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; + EasyBox-927376.pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; + "Asoziales Netzwerk".pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; + c-base-public = {}; + security-by-obscurity.psk = "44629828256481964386"; + discord.psk = "baraustrinken"; + }; + }; + + environment.systemPackages = [ pkgs.wpa_supplicant_gui ]; + } + { + networking.hosts = { + "192.168.178.1" = [ "fritz.box" ]; + "192.168.178.21" = [ "scardanelli" ]; + "192.168.178.22" = [ "homeros" ]; + "192.168.178.24" = [ "catullus" ]; + }; + } + { + i18n.defaultLocale = "en_GB.UTF-8"; + } + { + services.illum.enable = true; + } + { + services.xserver = { + enable = true; + displayManager.lightdm.greeters.gtk = { + enable = true; + indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ]; + }; + desktopManager.xterm.enable = false; + }; + } + { + fonts = { + enableDefaultFonts = true; + fonts = with pkgs; [ corefonts eb-garamond fira libertine lmodern noto-fonts roboto ubuntu_font_family ]; + }; + } + { + security.wrappers = { + pmount.source = "${pkgs.pmount}/bin/pmount"; + pumount.source = "${pkgs.pmount}/bin/pumount"; + }; + } + { + programs.command-not-found.enable = true; + } + { + programs.java = { + enable = true; + package = pkgs.openjdk; + }; + } + { + home-manager.users.me = { + programs.browserpass.enable = true; + programs.chromium = { + enable = true; + extensions = [ + "gighmmpiobklfepjocnamgkkbiglidom" # AdBlock + "hdokiejnpimakedhajhdlcegeplioahd" # LastPass + "jldhpllghnbhlbpcmnajkpdmadaolakh" # Todoist + "dbepggeogbaibhgnhhndojpepiihcmeb" # Vimium + ]; + }; + }; + } + { + environment.systemPackages = with pkgs; [ + ] ++ [ # office + libreoffice + ] ++ [ # internet + aria2 + chromium + firefox + tor-browser-bundle-bin + thunderbird + tdesktop + w3m + wget + httpie + whois + ddgr + instaloader + ] ++ [ # media + ffmpeg + imagemagick + sxiv + ] ++ [ # archive + unzip + unrar + p7zip + zip + ] ++ [ # monitor + htop + iotop + iftop + lsof + psmisc + ] ++ [ # shell + bat + dos2unix + du-dust + fd + file + jq + manpages + moreutils + posix_man_pages + ranger + ripgrep + rlwrap + tree + ] ++ [ # hardware + usbutils + pciutils + ] ++ [ # graphical + arandr + libnotify + xclip + xorg.xkill + ] ++ [ # typesetting + (texlive.combine { + inherit (pkgs.texlive) scheme-full texdoc latex2e-help-texinfo; + pkgFilter = pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "latex2e-help-texinfo"; + }) + pandoc + haskellPackages.pandoc-citeproc + haskellPackages.patat + asciidoctor + proselint + ] ++ [ # programming + tokei + gnumake + gcc + binutils-unwrapped + htmlTidy + iolanguage + nix-prefetch-git + nodePackages.csslint + nodePackages.prettier + nodePackages.jsonlint + ruby + rubocop + rustup + shellcheck + ] ++ [ # media + audacity + calibre + inkscape + xpdf + pdfgrep + pdftk + spotify + spotify-cli-linux + youtubeDL + ] ++ [ # math + bc + ] ++ [ # shell + # todoist + (aspellWithDicts (dict: [dict.de dict.en dict.la])) + bvg + autorenkalender + literature-quote + dic + yt-next + acronym + urban + daybook + gnupg + jo + memo + par + fzf + (pass.withExtensions (ext: [ext.pass-otp])) + qrencode + sncli + tmuxp + unstable.hledger + unstable.hledger-web + unstable.zola + wordnet + xsv + wttr + instaget + genius + nix-git + n + ]; + } + ]; +} diff --git a/configs/docker.nix b/configs/docker.nix new file mode 100644 index 0000000..3488fe1 --- /dev/null +++ b/configs/docker.nix @@ -0,0 +1,4 @@ +{ + virtualisation.docker.enable = true; + users.users.me.extraGroups = [ "docker" ]; +} diff --git a/configs/dunst.nix b/configs/dunst.nix new file mode 100644 index 0000000..26b30f1 --- /dev/null +++ b/configs/dunst.nix @@ -0,0 +1,62 @@ +{ config, pkgs, ... }: +let theme = import ; +in { + home-manager.users.me.services.dunst = { + enable = true; + iconTheme = config.niveum.theme.icon; + settings = { + global = { + transparency = 10; + font = "${theme.terminalFont.name} ${toString theme.terminalFont.size}"; + geometry = "200x5-30+20"; + frame_color = theme.invertedColorScheme.background; + follow = "mouse"; + indicate_hidden = true; + notification_height = 0; + separator_height = 2; + padding = 8; + horizontal_padding = 8; + separator_color = "auto"; + sort = true; + markup = "full"; + format = ''%a\n%s\n%b''; + alignment = "left"; + show_age_threshold = 60; + bounce_freq = 0; + word_wrap = true; + ellipsize = "middle"; + ignore_newline = false; + stack_duplicates = true; + hide_duplicate_count = false; + max_icon_size = 32; + sticky_history = true; + history_length = 20; + dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run"; + browser = config.niveum.applications.browser; + verbosity = "mesg"; + corner_radius = 0; + mouse_left_click = "do_action"; + mouse_right_click = "close_current"; + mouse_middle_click = "close_all"; + }; + urgency_low = { + frame_color = theme.invertedColorScheme.background; + background = theme.invertedColorScheme.background; + foreground = theme.invertedColorScheme.foreground; + timeout = 5; + }; + urgency_normal = { + frame_color = theme.invertedColorScheme.background; + background = theme.invertedColorScheme.background; + foreground = theme.invertedColorScheme.foreground; + timeout = 10; + }; + urgency_critical = { + frame_color = theme.invertedColorScheme.red.dark; + background = theme.invertedColorScheme.red.dark; + foreground = theme.invertedColorScheme.foreground; + timeout = 0; + }; + }; + }; +} diff --git a/configs/git.nix b/configs/git.nix new file mode 100644 index 0000000..2894060 --- /dev/null +++ b/configs/git.nix @@ -0,0 +1,31 @@ +{ pkgs, config, ... }: +{ + environment.systemPackages = [ + pkgs.git + pkgs.gitAndTools.hub + pkgs.gitAndTools.git-extras + pkgs.gitstats + pkgs.patch + pkgs.patchutils + ]; + + home-manager.users.me.programs.git = { + enable = true; + package = pkgs.gitAndTools.gitFull; + userName = config.niveum.user.name; + userEmail = config.niveum.user.email; + aliases = { + br = "branch"; + co = "checkout"; + ci = "commit"; + cm = "commit -m"; + amend = "commit --amend"; + st = "status"; + unstage = "reset HEAD --"; + diffs = "diff --staged"; + last = "log -1 HEAD"; + logs = "log --pretty=oneline"; + }; + ignores = config.niveum.ignore; + }; +} diff --git a/configs/graphics.nix b/configs/graphics.nix deleted file mode 100644 index 88f4132..0000000 --- a/configs/graphics.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ pkgs, lib, config, ... }: -{ - services.xserver = with import ; with import ; { - enable = true; - layout = commaSep [ "de" "gr" "ru" ]; - xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ]; - xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ]; - libinput = { - enable = true; - }; - xautolock = { - enable = true; - killer = "${pkgs.systemd}/bin/systemctl suspend"; - locker = config.defaultApplications.locker; - nowlocker = config.defaultApplications.locker; - enableNotifier = true; - notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."''; - }; - displayManager.sessionCommands = '' - ${pkgs.feh}/bin/feh --bg-fill $(find ${} -type f | shuf -n 1) & - ${pkgs.dropbox-cli}/bin/dropbox start & - ${pkgs.seafile-client}/bin/seafile-applet & - ${pkgs.systemd}/bin/systemctl --user import-environment XDG_SESSION_PATH - ${pkgs.lightlocker}/bin/light-locker & - ${pkgs.openssh}/bin/ssh-add - ''; - displayManager.lightdm.greeters.gtk = { - enable = true; - theme = { name = config.constants.theme.gtk.name; package = config.constants.theme.gtk.package; }; - iconTheme = { name = config.constants.theme.icon.name; package = config.constants.theme.icon.package; }; - indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ]; - }; - desktopManager.xterm.enable = false; - desktopManager.xfce.enable = true; - windowManager.default = "i3"; - windowManager.i3.enable = true; - xrandrHeads = { - homeros = [ "LVDS1" { output = "HDMI1"; primary = true; } ]; - scardanelli = [ "eDP1" ]; - }.${config.networking.hostName}; - }; - - i18n = { - defaultLocale = "en_GB.UTF-8"; - consoleKeyMap = "de"; - consoleColors = with import ; map (c: lib.strings.removePrefix "#" c) colorPalette; - }; - - services.compton = { - enable = true; - shadow = true; - menuOpacity = "0.9"; - shadowOpacity = "0.3"; - }; - - services.redshift = { - enable = true; - latitude = "52"; - longitude = "13"; - }; - - services.illum.enable = true; - - services.unclutter = { - enable = true; - timeout = 10; - }; - - home-manager.users.kfm = { - gtk = { - enable = true; - # font = with import ../theme.nix; { package = pkgs.noto-fonts; name = uiFont.name; }; - iconTheme = config.constants.theme.icon; - theme = config.constants.theme.gtk; - }; - - qt = { - enable = true; - useGtkTheme = true; - }; - - xsession.pointerCursor = config.constants.theme.cursor // { size = 16; }; - - xsession.windowManager.i3 = { - enable = true; - config = import { inherit lib pkgs config; }; - }; - - xresources.properties = import { inherit lib; }; - programs.rofi = import { inherit config; }; - services.dunst = import { inherit pkgs config; }; - programs.urxvt = import { inherit pkgs config; }; - }; -} diff --git a/configs/haskell.nix b/configs/haskell.nix new file mode 100644 index 0000000..236744e --- /dev/null +++ b/configs/haskell.nix @@ -0,0 +1,40 @@ +{ config, pkgs, ... }: +{ + home-manager.users.me.home.file = { + ".ghc/ghci.conf".text = '' + :set editor vim + :def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\"" + :def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\"" + :def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\"" + :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\"" + :set prompt "\o033[1m%s\o033[1;34m λ\o033[0m " + :set -Wall + ''; + ".stack/config.yaml".text = let user = config.niveum.user; in '' + templates: + params: + author-name: ${user.name} + author-email: ${user.email} + copyright: 'Copyright: (c) 2019 ${user.name}' + github-username: ${user.github} + ''; + }; + + environment.systemPackages = with pkgs; [ + cabal2nix + stack2nix + cabal-install + hlint + (haskellPackages.ghcWithHoogle (import )) + ] ++ map haskell.lib.justStaticExecutables [ + haskellPackages.ghcid + haskellPackages.hakyll + haskellPackages.brittany + haskellPackages.hfmt + haskellPackages.hasktags + haskellPackages.hindent + haskellPackages.pointfree + haskellPackages.pointful + haskellPackages.hpack + ]; +} diff --git a/configs/htop.nix b/configs/htop.nix new file mode 100644 index 0000000..66df981 --- /dev/null +++ b/configs/htop.nix @@ -0,0 +1,35 @@ +{ + home-manager.users.me = { + programs.htop = { + enable = true; + colorScheme = 0; + accountGuestInCpuMeter = true; + cpuCountFromZero = false; + delay = 15; + detailedCpuTime = false; + headerMargin = true; + hideKernelThreads = true; + hideThreads = false; + hideUserlandThreads = false; + highlightBaseName = true; + highlightMegabytes = true; + highlightThreads = true; + shadowOtherUsers = true; + showProgramPath = false; + showThreadNames = true; + sortDescending = true; + sortKey = "PERCENT_CPU"; + treeView = true; + updateProcessNames = false; + meters = { + left = [ + { kind = "LeftCPUs2"; mode = 1; } + { kind = "RightCPUs2"; mode = 1; } + { kind = "Memory"; mode = 1; } + { kind = "Swap"; mode = 1; } + ]; + right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ]; + }; + }; + }; +} diff --git a/configs/i3.nix b/configs/i3.nix new file mode 100644 index 0000000..2c83817 --- /dev/null +++ b/configs/i3.nix @@ -0,0 +1,175 @@ +{ config, pkgs, lib, ... }: +let + theme = import ; + new-workspace = pkgs.writeDash "new-workspace" '' + i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1)) + ''; + move-to-new-workspace = pkgs.writeDash "new-workspace" '' + i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1)) + ''; + wifi-interface = { scardanelli = "wlp2s0"; homeros = "wlp3s0"; }.${config.networking.hostName}; +in { + services.xserver = { + windowManager.default = "i3"; + windowManager.i3.enable = true; + }; + + home-manager.users.me.xsession.windowManager.i3 = { + enable = true; + config = rec { + fonts = [ "${theme.uiFont.name} ${toString theme.uiFont.size}" ]; + modifier = "Mod4"; + window = { + titlebar = false; + border = 1; + hideEdgeBorders = "smart"; + }; + floating = { + titlebar = false; + border = 1; + }; + colors = + let scheme = { background = theme.colorScheme.background; text = theme.colorScheme.foreground; }; + in { + focused = scheme // { + border = theme.colorScheme.background; + indicator = theme.colorScheme.background; + childBorder = theme.colorScheme.background; + }; + focusedInactive = scheme // { + border = theme.colorScheme.background; + indicator = theme.colorScheme.background; + childBorder = theme.colorScheme.background; + }; + unfocused = scheme // { + border = theme.colorScheme.background; + indicator = theme.colorScheme.background; + childBorder = theme.colorScheme.background; + }; + urgent = scheme // { + border = theme.colorScheme.red.light; + indicator = theme.colorScheme.red.light; + childBorder = theme.colorScheme.red.light; + }; + placeholder = scheme // { + border = theme.colorScheme.green.light; + indicator = theme.colorScheme.green.light; + childBorder = theme.colorScheme.green.light; + }; + }; + bars = [{ + workspaceButtons = false; + fonts = [ "${theme.terminalFont.name} ${toString theme.terminalFont.size}" ]; + mode = "hide"; + colors = { + background = theme.colorScheme.background; + separator = theme.colorScheme.background; + statusline = theme.colorScheme.foreground; + bindingMode = { + background = theme.colorScheme.red.light; + border = theme.colorScheme.background; + text = theme.colorScheme.foreground; + }; + }; + statusCommand = "${pkgs.i3status}/bin/i3status -c ${pkgs.writeText "i3status.conf" '' + general { + colors = true + color_good = "${theme.colorScheme.green.dark}" + color_bad = "${theme.colorScheme.red.dark}" + color_degraded = "${theme.colorScheme.black.light}" + interval = 5 + separator = " " + } + + order += "run_watch retiolum" + order += "path_exists openvpn" + order += "wireless ${wifi-interface}" + order += "battery all" + order += "volume master" + order += "load" + order += "tztime local" + + wireless ${wifi-interface} { + format_up = "%essid" + format_down = "offline" + } + + run_watch retiolum { + pidfile = "/var/run/tinc.retiolum.pid" + format = "%title" + } + + path_exists openvpn { + path = "/proc/sys/net/ipv4/conf/tun0" + format = "%title" + } + + battery all { + format = "%status%percentage" + format_down = "No battery" + status_chr = "↑" + status_bat = "↓" + status_unk = "" + status_full = "↯" + path = "/sys/class/power_supply/BAT%d/uevent" + low_threshold = 15 + threshold_type = "percentage" + integer_battery_capacity = true + } + + volume master { + format = "%volume" + format_muted = "%volume" + device = "default" + mixer = "Master" + mixer_idx = 0 + } + + tztime local { + format = "%Y-%m-%d %H:%M" + } + + load { + format = "%1min" + }''}"; + }]; + keybindings = { + "${modifier}+Down" = "focus down"; + "${modifier}+Left" = "focus left"; + "${modifier}+Return" = "exec ${config.niveum.applications.terminal}"; + "${modifier}+Right" = "focus right"; + "${modifier}+Shift+Down" = "move down"; + "${modifier}+Shift+Left" = "move left"; + "${modifier}+Shift+Right" = "move right"; + "${modifier}+Shift+Up" = "move up"; + "${modifier}+Shift+c" = "reload"; + "${modifier}+Shift+n" = "move window to workspace next"; + "${modifier}+Shift+b" = "move window to workspace prev"; + "${modifier}+Shift+q" = "kill"; + "${modifier}+Shift+r" = "restart"; + "${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow"; + "${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}"; + "${modifier}+Shift+z" = "floating toggle"; + "${modifier}+Up" = "focus up"; + "${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window"; + "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run"; + "${modifier}+e" = "layout toggle split"; + "${modifier}+f" = "fullscreen toggle"; + "${modifier}+h" = "split h"; + "${modifier}+n" = "workspace next"; + "${modifier}+b" = "workspace prev"; + "${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass"; + "${modifier}+r" = "mode resize"; + "${modifier}+s" = "layout stacking"; + "${modifier}+t" = "exec ${config.niveum.applications.fileManager}"; + "${modifier}+v" = "split v"; + "${modifier}+w" = "layout tabbed"; + "${modifier}+x" = "exec --no-startup-id ${new-workspace}"; + "${modifier}+y" = "exec ${config.niveum.applications.browser}"; + "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks"; + "XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks"; + "XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks"; + }; + }; + }; +} diff --git a/configs/kdeconnect.nix b/configs/kdeconnect.nix new file mode 100644 index 0000000..67853fa --- /dev/null +++ b/configs/kdeconnect.nix @@ -0,0 +1,13 @@ +{ + networking.firewall = { + allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; + allowedUDPPortRanges = [ { from = 1714; to = 1764; } ]; + }; + + home-manager.users.me = { + services.kdeconnect = { + enable = true; + indicator = true; + }; + }; +} diff --git a/configs/keyboard.nix b/configs/keyboard.nix new file mode 100644 index 0000000..65f8863 --- /dev/null +++ b/configs/keyboard.nix @@ -0,0 +1,11 @@ +with import ; +{ + services.xserver = { + layout = commaSep [ "de" "gr" "ru" ]; + xkbVariant = commaSep [ "T3" "polytonic" "phonetic_winkeys" ]; + xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ]; + libinput.enable = true; + }; + + i18n.consoleKeyMap = "de"; +} diff --git a/configs/mpv.nix b/configs/mpv.nix new file mode 100644 index 0000000..3c530db --- /dev/null +++ b/configs/mpv.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ pkgs.mpv pkgs.mpv-poll ]; + + home-manager.users.me.xdg.configFile = { + "mpv/input.conf".text = '' + Alt+RIGHT add video-rotate 90 + Alt+LEFT add video-rotate -90 + Alt+- add video-zoom -0.25 + Alt+= add video-zoom 0.25 + Alt+l add video-pan-x -0.05 + Alt+h add video-pan-x 0.05 + Alt+k add video-pan-y 0.05 + Alt+j add video-pan-y -0.05 + ''; + }; +} diff --git a/configs/nano.nix b/configs/nano.nix new file mode 100644 index 0000000..f038351 --- /dev/null +++ b/configs/nano.nix @@ -0,0 +1,10 @@ +{ + programs.nano.nanorc = '' + set autoindent + set boldtext + set morespace + set smarthome + set tabsize 4 + set tabstospaces + ''; +} diff --git a/configs/editors.nix b/configs/neovim.nix similarity index 65% rename from configs/editors.nix rename to configs/neovim.nix index de71fb3..615da9e 100644 --- a/configs/editors.nix +++ b/configs/neovim.nix @@ -1,23 +1,12 @@ -{ pkgs, config, ... }: -let vimConfig = import { inherit config pkgs; }; -in { - programs.nano.nanorc = '' - set autoindent - set boldtext - set morespace - set smarthome - set tabsize 4 - set tabstospaces - ''; - +{ pkgs, ... }: +{ environment.variables.EDITOR = pkgs.lib.mkForce "nvim"; environment.shellAliases.vi = "nvim"; environment.shellAliases.vim = "nvim"; environment.shellAliases.view = "nvim -R"; - environment.systemPackages = [pkgs.nvim]; - nixpkgs.config.packageOverrides = pkgs: { - nvim = pkgs.neovim.override { + environment.systemPackages = [ + (pkgs.neovim.override { configure = { customRC = builtins.readFile ; packages.nvim = with pkgs.vimPlugins; { @@ -38,28 +27,6 @@ in { vim-sensible vim-startify vim-surround - # (pkgs.vimUtils.buildVimPlugin rec { - # name = "connermcd"; - # src = pkgs.fetchFromGitHub { - # owner = "connermcd"; - # repo = "dotfiles"; - # rev = "3a2788cc94e5e51144adcad4da4f9489ccd3e341"; - # sha256 = "1p0r4nd4syhy62mkz1iji6kwsg2hvcr7q5qzaqv6p52dkm7ffx52"; - # }; - # buildPhase = '' - # mkdir -p $out/share/vim-plugins/${name}/colors - # mv .vim/colors/*.vim $out/share/vim-plugins/${name}/colors/ - # ''; - # }) - # (pkgs.vimUtils.buildVimPluginFrom2Nix { - # name = "apprentice"; - # src = pkgs.fetchFromGitHub { - # owner = "romainl"; - # repo = "Apprentice"; - # rev = "0ca2038758f9d7dfdf51733db8d22665663382f7"; - # sha256 = "1jdfn3wm46ndc24lkzxy3akjbqwglrdy7qqyypbwwsq7vp0s5051"; - # }; - # }) (pkgs.vimUtils.buildVimPluginFrom2Nix rec { name = "vim-colors-paramount"; src = pkgs.fetchFromGitHub { @@ -112,6 +79,6 @@ in { ]; }; }; - }; - }; + }) + ]; } diff --git a/configs/networks.nix b/configs/networks.nix deleted file mode 100644 index 58eb258..0000000 --- a/configs/networks.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ pkgs, config, lib, ... }: -let - sshPort = 22022; - sshKey = { - homeros = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com"; - scardanelli = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com"; - }; -in { - networking.hosts = lib.mapAttrs (_: value: [ (value + ".local") ]) { - "192.168.178.1" = "router"; - "192.168.178.21" = "scardanelli"; - "192.168.178.22" = "homeros"; - "192.168.178.24" = "catullus"; - "192.168.178.27" = "printer"; - }; - - networking.wireless = { - enable = true; - userControlled.enable = true; - networks = { - Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; - EasyBox-927376.pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; - "Asoziales Netzwerk".pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; - c-base-public = {}; - security-by-obscurity.psk = "44629828256481964386"; - discord.psk = "baraustrinken"; - }; - }; - - # for kdeconnect - networking.firewall = { - allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; - allowedUDPPortRanges = [ { from = 1714; to = 1764; } ]; - }; - - home-manager.users.kfm = { - services.kdeconnect = { - enable = true; - indicator = true; - }; - - programs.ssh = { - enable = true; - matchBlocks = { - scardanelli = { - hostname = "scardanelli.local"; - user = "kfm"; - port = sshPort; - }; - homeros = { - hostname = "homeros.local"; - user = "kfm"; - port = sshPort; - }; - catullus = { - hostname = "catullus.local"; - user = "root"; - }; - menstruation-logs = { - user = "root"; - hostname = "v22017123717457389.megasrv.de"; - port = 49123; - }; - irc = { - user = "kmein"; - hostname = "prism.r"; - extraOptions.RemoteCommand = "tmux a"; - }; - "gitlab.peixdev.net".port = 999; - }; - }; - }; - - programs.ssh.startAgent = true; - - services.openssh = { - ports = [ sshPort ]; - enable = true; - forwardX11 = true; - passwordAuthentication = false; - }; - - services.syncthing = rec { - enable = true; - # user = config.users.users.kfm.name; - # dataDir = "${config.users.users.kfm.home}/.config/syncthing"; - user = "kfm"; - dataDir = "/home/${user}/.config/syncthing"; - openDefaultPorts = true; - }; - - users.users.root.openssh.authorizedKeys.keys = [ - sshKey.homeros - sshKey.scardanelli - ]; - - users.users.kfm.openssh.authorizedKeys.keys = [ - sshKey.homeros - sshKey.scardanelli - ]; -} diff --git a/configs/packages.nix b/configs/packages.nix deleted file mode 100644 index bcdd1cd..0000000 --- a/configs/packages.nix +++ /dev/null @@ -1,234 +0,0 @@ -{ config, pkgs, lib, ... }: -let - unstable = import {}; - executables = pkgs.haskell.lib.justStaticExecutables; - haskells = import ; -in with pkgs; -{ - nixpkgs.config.allowUnfree = true; - - nixpkgs.overlays = [ - (import ) - ]; - - nixpkgs.config.packageOverrides = pkgs: { - bvg = pkgs.callPackage {}; - daybook = pkgs.callPackage {}; - iolanguage = pkgs.callPackage {}; - sncli = pkgs.python3Packages.callPackage {}; - todoist = pkgs.callPackage {}; - spotify-cli-linux = pkgs.python3Packages.callPackage {}; - instaloader = pkgs.python3Packages.callPackage {}; - autorenkalender = pkgs.callPackage {}; - literature-quote = pkgs.callPackage {}; - dic = pkgs.callPackage {}; - yt-next = pkgs.callPackage {}; - acronym = pkgs.callPackage {}; - urban = pkgs.callPackage {}; - mpv-poll = pkgs.callPackage {}; - }; - - fonts.enableDefaultFonts = true; - fonts.fonts = [ - corefonts - eb-garamond - fira - libertine - lmodern - noto-fonts - roboto - xlibs.fontschumachermisc - ubuntu_font_family - ]; - - environment.systemPackages = [ - ] ++ [ # office - abiword - gnumeric - # typora - ] ++ [ # theme - config.constants.theme.gtk.package - config.constants.theme.icon.package - config.constants.theme.cursor.package - ] ++ [ # internet - aria2 - chromium - firefox - tor-browser-bundle-bin - thunderbird - tdesktop - w3m - wget - httpie - whois - ddgr - instaloader - ] ++ [ # media - ffmpeg - mpv - pamixer - pavucontrol - gthumb - imagemagick - sxiv - blueman - zathura - ] ++ [ # archive - unzip - unrar - p7zip - zip - ] ++ [ # monitor - htop - iotop - iftop - lsof - psmisc - ] ++ [ # shell - bat - dos2unix - du-dust - exa - fd - file - git - gitAndTools.hub - gitAndTools.git-extras - gitstats - jq - manpages - moreutils - patch - patchutils - posix_man_pages - ranger - ripgrep - rlwrap - tree - ] ++ [ # hardware - pmount - usbutils - pciutils - ] ++ [ # graphical - arandr - libnotify - xclip - xorg.xkill - wpa_supplicant_gui - ]; - - security.wrappers = { - pmount.source = "${pkgs.pmount}/bin/pmount"; - pumount.source = "${pkgs.pmount}/bin/pumount"; - }; - - programs.command-not-found.enable = true; - programs.java = { - enable = true; - package = pkgs.openjdk; - }; - virtualisation.docker.enable = true; - services.urxvtd.enable = true; - services.dbus.packages = [ pkgs.gnome3.dconf ]; - - users.users.kfm.packages = [ - ] ++ [ # typesetting - (texlive.combine { - inherit (pkgs.texlive) scheme-full texdoc latex2e-help-texinfo; - pkgFilter = pkg: pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "latex2e-help-texinfo"; - }) - pandoc - (executables haskellPackages.pandoc-citeproc) - (executables haskellPackages.patat) - asciidoctor - proselint - ] ++ [ # programming - vscode - tokei - gnumake - cabal2nix - chicken - clojure - gcc - binutils-unwrapped - (haskellPackages.ghcWithHoogle haskells) - (executables haskellPackages.cabal-install) - (executables haskellPackages.ghcid) - (executables haskellPackages.hakyll) - (haskellPackages.brittany) - (executables haskellPackages.hfmt) - (executables haskellPackages.hasktags) - # (executables haskellPackages.hindent) - (executables haskellPackages.pointfree) - (executables haskellPackages.pointful) - (executables haskellPackages.hlint) - (executables haskellPackages.hpack) - htmlTidy - iolanguage - lua - mypy - nix-prefetch-git - nodejs - nodePackages.csslint - nodePackages.prettier - nodePackages.jsonlint - ocaml - python3 - python3Packages.black - python3Packages.python-language-server - python3Packages.pyls-mypy - python3Packages.flake8 - # python3Packages.jedi - ruby - rubocop - rustup - # rustracer - scala - shellcheck - ] ++ [ # media - audacity - calibre - inkscape - xpdf - pdfgrep - pdftk - spotify - spotify-cli-linux - youtubeDL - ] ++ [ # cloud - dropbox-cli - grive2 - seafile-client - ] ++ [ # math - bc - graphviz - maxima - ] ++ [ # shell - # todoist - aspell - aspellDicts.de - aspellDicts.en - aspellDicts.la - bvg - autorenkalender - literature-quote - dic - yt-next - acronym - urban - mpv-poll - daybook - gnupg - jo - memo - par - fzf - (pass.withExtensions (ext: [ext.pass-otp])) - qrencode - sncli - tmuxp - unstable.hledger - wordnet - xsv - ] ++ (if config.networking.hostName == "homeros" then [ unstable.zeroad ] else []); -} diff --git a/configs/printing.nix b/configs/printing.nix new file mode 100644 index 0000000..d30abe3 --- /dev/null +++ b/configs/printing.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: +{ + services.printing = { + enable = true; + drivers = [ pkgs.hplipWithPlugin ]; + }; + + networking.hosts."192.168.178.27" = [ "officejet" ]; +} diff --git a/configs/python.nix b/configs/python.nix new file mode 100644 index 0000000..70dc56e --- /dev/null +++ b/configs/python.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ + (pkgs.python3.withPackages + (py: [ + py.black + py.python-language-server + py.pyls-mypy + py.flake8 + ]) + ) + ]; + + home-manager.users.me.xdg.configFile."pycodestyle".text = '' + [pycodestyle] + max-line-length = 110 + ''; +} diff --git a/configs/redshift.nix b/configs/redshift.nix new file mode 100644 index 0000000..8d55314 --- /dev/null +++ b/configs/redshift.nix @@ -0,0 +1,7 @@ +{ + services.redshift = { + enable = true; + latitude = "52"; + longitude = "13"; + }; +} diff --git a/configs/rofi.nix b/configs/rofi.nix new file mode 100644 index 0000000..316d0ee --- /dev/null +++ b/configs/rofi.nix @@ -0,0 +1,40 @@ +{ config, ... }: +let theme = import ; +in { + home-manager.users.me.programs.rofi = { + enable = true; + separator = "solid"; + scrollbar = false; + terminal = config.niveum.applications.terminal; + borderWidth = 0; + lines = 5; + font = "${theme.terminalFont.name} ${toString (theme.terminalFont.size + 1)}"; + colors = rec { + window = { + background = theme.invertedColorScheme.background; + border = theme.invertedColorScheme.background; + separator = theme.invertedColorScheme.black.light; + }; + rows = { + normal = { + background = window.background; + backgroundAlt = window.background; + foreground = theme.invertedColorScheme.foreground; + highlight = { foreground = theme.invertedColorScheme.cyan.dark; inherit (window) background; }; + }; + active = { + background = window.background; + backgroundAlt = window.background; + foreground = theme.invertedColorScheme.yellow.dark; + highlight = { foreground = theme.invertedColorScheme.green.dark; inherit (window) background; }; + }; + urgent = { + background = window.background; + backgroundAlt = window.background; + foreground = theme.invertedColorScheme.red.dark; + highlight = { foreground = theme.invertedColorScheme.magenta.dark; inherit (window) background; }; + }; + }; + }; + }; +} diff --git a/configs/scripts.nix b/configs/scripts.nix deleted file mode 100644 index 4f77fd0..0000000 --- a/configs/scripts.nix +++ /dev/null @@ -1,122 +0,0 @@ -{ config, pkgs, lib, ... }: -let - theme = import ; - unstable = import {}; - scripts.instaget = unstable.writers.writeDashBin "instaget" '' - for url in "$@"; do - ${pkgs.curl}/bin/curl -s "$url" \ - | grep display_url \ - | grep -o '{.*}' \ - | ${pkgs.jq}/bin/jq -r ' - .entry_data.PostPage - | .[].graphql.shortcode_media.edge_sidecar_to_children.edges - | .[].node.display_url' \ - | xargs ${pkgs.wget}/bin/wget - done - ''; - bingWallpaper = unstable.writers.writeBash "bing-wallpaper.sh" '' - PICTURE_DIR="$HOME/pictures/external/bing/" - - mkdir -p $PICTURE_DIR - - urls=( $(${pkgs.curl}/bin/curl -s http://www.bing.com \ - | grep -Eo "url:'.*?'" \ - | sed -e "s/url:'\([^']*\)'.*/http:\/\/bing.com\1/" \ - | sed -e "s/\\\//g") ) - - for p in ''${urls[@]}; do - filename=$(echo $p | sed -e "s/.*\/\(.*\)/\1/") - if [ ! -f $PICTURE_DIR/$filename ]; then - ${pkgs.curl}/bin/curl -Lo "$PICTURE_DIR/$filename" $p - fi - done - ''; - scripts.pull-all = unstable.writers.writeDashBin "pull-all" '' - CUR_DIR=$(pwd) - echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" - for i in $(find . -name ".git" | cut -c 3-); do - echo "" - echo -e "\033[33m"+$i+"\033[0m" - cd "$i" - cd .. - git pull origin master - cd $CUR_DIR - done - echo -e "\n\033[32mComplete!\033[0m\n" - ''; - scripts.genius = unstable.writers.writeDashBin "genius" '' - test $# -eq 2 || ( - echo "usage: $0 " - exit 1 - ) - - normalize() { - tr -d -c '0-9A-Za-z ' | tr ' ' - | tr '[:upper:]' '[:lower:]' - } - - ARTIST=$(echo "$1" | normalize | ${pkgs.gnused}/bin/sed 's/./\U&/') - TITLE=$(echo "$2" | normalize) - GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics" - - ${pkgs.curl}/bin/curl -s "$GENIUS_URL" \ - | ${pkgs.gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \ - | ${pkgs.pandoc}/bin/pandoc -f html -s -t plain \ - | ${pkgs.gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g' - - printf "\n(source: $GENIUS_URL)\n" >/dev/stderr - ''; - scripts.generate-shell-nix = - let repository = pkgs.fetchFromGitHub { - owner = "kmein"; - repo = "generate-shell-nix"; - rev = "1e6aed53701b5276d065f0dc70ba5479d2c6d041"; - sha256 = "1532w34p46mjqnm2bx72f98gacgb3ncd00rflxr54pq94klh26is"; - }; - in pkgs.writeScriptBin "generate-shell-nix" (builtins.readFile "${repository.out}/generate-shell-nix"); - scripts.font-size = unstable.writers.writeDashBin "font-size" '' - set -efu - - # set_font NORMAL_FONT BOLD_FONT - set_font() { - printf '\033]710;%s\007' "$1" - printf '\033]711;%s\007' "$2" - } - - case ''${1-} in - '''|0|--reset) - set_font \ - "xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}" \ - "xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}:bold" \ - ;; - [2-9]|[1-9][0-9]|[1-9][0-9][0-9]) - set_font \ - "xft:${theme.terminalFont.name}:size=$1" \ - "xft:${theme.terminalFont.name}:size=$1:bold" \ - ;; - *) - echo "$0: bad argument: $1" >&2 - exit 1 - esac - ''; - scripts.wttr = unstable.writers.writeDashBin "wttr" '' - ${pkgs.curl}/bin/curl -s -H "Accept-Language: ''${LANG%_*}" --compressed "wttr.in/''${1-"@$(${pkgs.curl}/bin/curl -s ipinfo.io | ${pkgs.jq}/bin/jq -r .ip)"}?0" - ''; - scripts.nix-git = unstable.writers.writeDashBin "nix-git" '' - ${pkgs.nix-prefetch-git}/bin/nix-prefetch-git "$@" 2> /dev/null | ${pkgs.jq}/bin/jq -r '"rev = \"\(.rev)\";\nsha256 = \"\(.sha256)\";"' - ''; - scripts.n = unstable.writers.writeDashBin "n" '' - nix-shell -p "''${2:-$1}" --run "$1" - ''; -in { - environment.shellAliases = - let rlwrap = cmd: "${pkgs.rlwrap}/bin/rlwrap ${cmd}"; - in { - o = "${pkgs.xdg_utils}/bin/xdg-open"; - clipboard = "${pkgs.xclip}/bin/xclip -se c"; - ip = "${pkgs.iproute}/bin/ip -c"; - ocaml = rlwrap "${pkgs.ocaml}/bin/ocaml"; - tmux = "${pkgs.tmux}/bin/tmux -2"; - }; - - environment.systemPackages = lib.attrsets.attrValues scripts; -} diff --git a/configs/ssh.nix b/configs/ssh.nix new file mode 100644 index 0000000..5084525 --- /dev/null +++ b/configs/ssh.nix @@ -0,0 +1,59 @@ +{ pkgs, ... }: +let + sshPort = 22022; + sshKey = { + homeros = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com"; + scardanelli = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com"; + }; +in { + services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add"; + + programs.ssh.startAgent = true; + + services.openssh = { + ports = [ sshPort ]; + enable = true; + passwordAuthentication = false; + }; + + users.users.root.openssh.authorizedKeys.keys = [ + sshKey.homeros + sshKey.scardanelli + ]; + + users.users.me.openssh.authorizedKeys.keys = [ + sshKey.homeros + sshKey.scardanelli + ]; + + home-manager.users.me.programs.ssh = { + enable = true; + matchBlocks = { + scardanelli = { + hostname = "scardanelli.local"; + user = "kfm"; + port = sshPort; + }; + homeros = { + hostname = "homeros.local"; + user = "kfm"; + port = sshPort; + }; + catullus = { + hostname = "catullus.local"; + user = "root"; + }; + menstruation-logs = { + user = "root"; + hostname = "v22017123717457389.megasrv.de"; + port = 49123; + }; + irc = { + user = "kmein"; + hostname = "prism.r"; + extraOptions.RemoteCommand = "tmux a"; + }; + "gitlab.peixdev.net".port = 999; + }; + }; +} diff --git a/configs/theming.nix b/configs/theming.nix new file mode 100644 index 0000000..e2451b8 --- /dev/null +++ b/configs/theming.nix @@ -0,0 +1,35 @@ +{ lib, config, ... }: +{ + i18n.consoleColors = with import ; map (c: lib.strings.removePrefix "#" c) colorPalette; + + environment.systemPackages = [ + config.niveum.theme.gtk.package + config.niveum.theme.icon.package + config.niveum.theme.cursor.package + ]; + + + services.xserver.displayManager.lightdm.greeters.gtk = { + theme = { + name = config.niveum.theme.gtk.name; + package = config.niveum.theme.gtk.package; + }; + iconTheme = { + name = config.niveum.theme.icon.name; + package = config.niveum.theme.icon.package; + }; + }; + + home-manager.users.me = { + gtk = { + enable = true; + iconTheme = config.niveum.theme.icon; + theme = config.niveum.theme.gtk; + }; + qt = { + enable = true; + useGtkTheme = true; + }; + xsession.pointerCursor = config.niveum.theme.cursor // { size = 16; }; + }; +} diff --git a/configs/tmux.nix b/configs/tmux.nix new file mode 100644 index 0000000..7d7a25a --- /dev/null +++ b/configs/tmux.nix @@ -0,0 +1,33 @@ +{ + programs.tmux = { + enable = true; + keyMode = "vi"; + terminal = "screen-256color"; + extraTmuxConf = '' + set -g status-interval 2 + set -g status-left-length 32 + set -g status-right-length 150 + + set -g status-bg default + + setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W " + setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W " + + set -g status-left "" + set -g status-right "# [fg=colour255,bg=colour237,bold] %Y-%m-%d #[default]#[fg=colour12,bg=colour233] %H:%M " + set -g status-justify left + + set -g pane-active-border-fg colour237 + set -g pane-border-fg colour237 + set -g pane-active-border-bg default + set -g pane-border-bg default + + set -g status-position bottom + + set -g mouse on + + unbind * + bind * list-clients + ''; + }; +} diff --git a/configs/unclutter.nix b/configs/unclutter.nix new file mode 100644 index 0000000..485f14c --- /dev/null +++ b/configs/unclutter.nix @@ -0,0 +1,6 @@ +{ + services.unclutter = { + enable = true; + timeout = 10; + }; +} diff --git a/configs/urxvt.nix b/configs/urxvt.nix new file mode 100644 index 0000000..597d5cf --- /dev/null +++ b/configs/urxvt.nix @@ -0,0 +1,27 @@ +{ pkgs, config, ... }: +let theme = import ; +in { + services.urxvtd.enable = true; + + home-manager.users.me.programs.urxvt = { + enable = true; + package = pkgs.rxvt_unicode-with-plugins; + keybindings = { + "Shift-Control-C" = "eval:selection_to_clipboard"; + "Shift-Control-V" = "eval:paste_clipboard"; + }; + scroll.bar.enable = false; + extraConfig = { + perl-ext = "default,url-select"; + "url-select.launcher" = "/usr/bin/env chromium"; + "url-select.underline" = true; + "colorUL" = theme.colorScheme.blue.light; + "perl-lib" = "${pkgs.urxvt_perls}/lib/urxvt/perl"; + urlLauncher = "/usr/bin/env chromium"; + fading = 20; + iso14755 = false; + urgentOnBell = true; + reverseVideo = false; + }; + }; +} diff --git a/configs/vscode.nix b/configs/vscode.nix new file mode 100644 index 0000000..f8232de --- /dev/null +++ b/configs/vscode.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ + (pkgs.vscode-with-extensions.override { + vscodeExtensions = [ + pkgs.vscode-extensions.bbenoist.Nix + ]; + }) + ]; +} diff --git a/configs/xautolock.nix b/configs/xautolock.nix new file mode 100644 index 0000000..5ba2b3f --- /dev/null +++ b/configs/xautolock.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: +{ + services.xserver.displayManager.sessionCommands = '' + ${pkgs.systemd}/bin/systemctl --user import-environment XDG_SESSION_PATH + ${pkgs.lightlocker}/bin/light-locker & + ''; + + services.xserver.xautolock = { + enable = true; + killer = "${pkgs.systemd}/bin/systemctl suspend"; + locker = "${pkgs.lightlocker}/bin/light-locker-command -l"; + nowlocker = "${pkgs.lightlocker}/bin/light-locker-command -l"; + enableNotifier = true; + notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking soon" "The screen will lock in 10 seconds."''; + }; +} diff --git a/dot/xresources.nix b/configs/xresources.nix similarity index 65% rename from dot/xresources.nix rename to configs/xresources.nix index cc1e049..3f34898 100644 --- a/dot/xresources.nix +++ b/configs/xresources.nix @@ -1,17 +1,13 @@ -{ lib }: +{ lib, ... }: let theme = import ; -in with lib; lists.foldr - (i: cs: cs // { "*color${toString i}" = builtins.elemAt theme.colorPalette i; }) - { +in { + home-manager.users.me.xresources.properties = { "*background" = theme.colorScheme.background; "*foreground" = theme.colorScheme.foreground; "*fadeColor" = theme.colorScheme.background; "*cursorColor" = theme.colorScheme.cursorColor; - - # "URxvt*font" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; - # "URxvt*boldFont" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; "*.font" = "xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}"; "*.boldFont" = "xft:${theme.terminalFont.name}:style=Bold:size=${toString theme.terminalFont.size}"; "*.italicFont" = "xft:${theme.terminalFont.name}:style=Italic:size=${toString theme.terminalFont.size}"; - } - (lists.range 0 15) + } // lib.lists.foldr (i: cs: cs // { "*color${toString i}" = builtins.elemAt theme.colorPalette i; }) {} (lib.lists.range 0 15); +} diff --git a/configs/shells.nix b/configs/zsh.nix similarity index 54% rename from configs/shells.nix rename to configs/zsh.nix index 47e8c8a..d644152 100644 --- a/configs/shells.nix +++ b/configs/zsh.nix @@ -1,45 +1,6 @@ -{ config, pkgs, lib, ... }: -let - zsh-plugins-file = - pkgs.writeText "zsh_plugins.txt" (lib.concatStringsSep "\n" [ - "sharat87/zsh-vim-mode" - "Tarrasch/zsh-mcd" - "mafredri/zsh-async" - "zsh-users/zsh-completions" - "caarlos0/ports kind:path" - "Tarrasch/zsh-functional" - "zsh-users/zsh-history-substring-search" - ]); - zsh-plugins = - let package = {pkgs}: - pkgs.stdenv.mkDerivation rec { - name = "zsh-plugins"; - phases = [ "configurePhase" "installPhase" ]; - buildInputs = with pkgs; [ antibody git ]; - configurePhase = '' - export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt - export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt - ''; - installPhase = '' - mkdir -p $out/.cache - XDG_CACHE_HOME=$out/.cache antibody bundle < ${zsh-plugins-file} > $out/zsh_plugins.sh - ''; - }; - in pkgs.callPackage package {}; -in { - environment.shellAliases = { - ns = "nix-shell --run zsh"; - # niveum-switch = "sudo -i nixos-rebuild --fast switch"; - # niveum-upgrade = "sudo -i nix-channel --update && sudo -i nixos-rebuild switch"; - nixi = ''nix repl ""''; - grep = "grep --color=auto"; - rm = "rm -i"; - cp = "cp -i"; - mv = "mv -i"; - niveum-update = "nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-18.09 > ~niveum/nixpkgs.json"; - }; - - environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin"; +{ config, ... }: +{ + home-manager.users.me.home.file.".zshrc".text = "# nothing to see here"; programs.zsh = { enable = true; @@ -70,7 +31,7 @@ in { export KEYTIMEOUT=1 - hash -d nixos=/etc/nixos niveum=${config.users.users.kfm.home}/prog/git/niveum + hash -d nixos=/etc/nixos niveum=${config.users.users.me.home}/prog/git/niveum autoload -U zmv run-help @@ -117,13 +78,4 @@ in { zle -N zle-keymap-select ''; }; - - programs.bash = { - promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "''; - interactiveShellInit = '' - set -o vi - ''; - enableCompletion = true; - }; - } diff --git a/deploy.nix b/deploy.nix index e21f1ea..f390f57 100644 --- a/deploy.nix +++ b/deploy.nix @@ -11,18 +11,26 @@ let importJson = (import {}).lib.importJSON; source = {path, other ? {}}: lib.evalSource [({ - home-manager.git = { - url = https://github.com/rycee/home-manager; - ref = "2ccbf43"; - }; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs-channels; ref = (importJson ./nixpkgs.json).rev; }; + nixos-unstable.git = { + url = https://github.com/NixOS/nixpkgs-channels; + ref = "nixos-unstable"; + }; + home-manager.git = { + url = https://github.com/rycee/home-manager; + ref = "2ccbf43"; + }; stockholm.git = { url = https://cgit.krebsco.de/stockholm; ref = "7e1b197dab13d024ba491c96dc959306324943c0"; }; + nix-writers.git = { + url = https://cgit.krebsco.de/nix-writers; + ref = "c528cf970e292790b414b4c1c8c8e9d7e73b2a71"; + }; system.file = toString path; art.file = toString ./art; lib.file = toString ./lib; diff --git a/dot/dunst.nix b/dot/dunst.nix deleted file mode 100644 index 6f72ab5..0000000 --- a/dot/dunst.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ config, pkgs }: -with import ; -{ - enable = true; - iconTheme = config.constants.theme.icon; - settings = { - global = { - transparency = 10; - font = "${terminalFont.name} ${toString terminalFont.size}"; - geometry = "200x5-30+20"; - frame_color = invertedColorScheme.background; - follow = "mouse"; - indicate_hidden = true; - notification_height = 0; - separator_height = 2; - padding = 8; - horizontal_padding = 8; - separator_color = "auto"; - sort = true; - markup = "full"; - format = ''%a\n%s\n%b''; - alignment = "left"; - show_age_threshold = 60; - bounce_freq = 0; - word_wrap = true; - ellipsize = "middle"; - ignore_newline = false; - stack_duplicates = true; - hide_duplicate_count = false; - max_icon_size = 32; - sticky_history = true; - history_length = 20; - dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run"; - browser = "${pkgs.xdg_utils}/bin/xdg-open"; - verbosity = "mesg"; - corner_radius = 0; - mouse_left_click = "do_action"; - mouse_right_click = "close_current"; - mouse_middle_click = "close_all"; - }; - urgency_low = { frame_color = invertedColorScheme.background; background = invertedColorScheme.background; foreground = invertedColorScheme.foreground; timeout = 5; }; - urgency_normal = { frame_color = invertedColorScheme.background; background = invertedColorScheme.background; foreground = invertedColorScheme.foreground; timeout = 10; }; - urgency_critical = { frame_color = invertedColorScheme.red.dark; background = invertedColorScheme.red.dark; foreground = invertedColorScheme.foreground; timeout = 0; }; - }; -} diff --git a/dot/ghci.nix b/dot/ghci.nix deleted file mode 100644 index 569f8b3..0000000 --- a/dot/ghci.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs }: -'' -:set editor vim -:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\"" -:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\"" -:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\"" -:def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\"" -:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m " -:set -Wall -'' -# :def djinn \x -> return $ ":!echo \"" ++ x ++ "\" | ${pkgs.haskell.packages.ghc7102.djinn}/bin/djinn /dev/stdin" diff --git a/dot/i3.nix b/dot/i3.nix deleted file mode 100644 index 079ffec..0000000 --- a/dot/i3.nix +++ /dev/null @@ -1,177 +0,0 @@ -{ pkgs, config, lib }: -let - unstable = import {}; - i3blocks_conf = import { inherit pkgs; }; - new-workspace = unstable.writers.writeDash "new-workspace" '' - i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1)) - ''; - move-to-new-workspace = unstable.writers.writeDash "new-workspace" '' - i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1)) - ''; - wifi-interface = { - scardanelli = "wlp2s0"; - homeros = "wlp3s0"; - }.${config.networking.hostName}; -in with import ; -rec { - fonts = [ "${uiFont.name} ${toString uiFont.size}" ]; - modifier = "Mod4"; - window = { - titlebar = false; - border = 1; - hideEdgeBorders = "smart"; - }; - floating = { - titlebar = false; - border = 1; - }; - colors = - let scheme = { background = colorScheme.background; text = colorScheme.foreground; }; - in { - focused = scheme // { - border = colorScheme.background; - indicator = colorScheme.background; - childBorder = colorScheme.background; - }; - focusedInactive = scheme // { - border = colorScheme.background; - indicator = colorScheme.background; - childBorder = colorScheme.background; - }; - unfocused = scheme // { - border = colorScheme.background; - indicator = colorScheme.background; - childBorder = colorScheme.background; - }; - urgent = scheme // { - border = colorScheme.red.light; - indicator = colorScheme.red.light; - childBorder = colorScheme.red.light; - }; - placeholder = scheme // { - border = colorScheme.green.light; - indicator = colorScheme.green.light; - childBorder = colorScheme.green.light; - }; - }; - bars = [{ - workspaceButtons = false; - fonts = [ "${terminalFont.name} ${toString terminalFont.size}" ]; - mode = "hide"; - colors = { - background = colorScheme.background; - separator = colorScheme.background; - statusline = colorScheme.foreground; - bindingMode = { - background = colorScheme.red.light; - border = colorScheme.background; - text = colorScheme.foreground; - }; - }; - # position = "top"; - statusCommand = - let - i3status-config = pkgs.writeText "i3status.conf" '' - general { - colors = true - color_good = "${colorScheme.green.dark}" - color_bad = "${colorScheme.red.dark}" - color_degraded = "${colorScheme.black.light}" - interval = 5 - separator = " " - } - - order += "run_watch retiolum" - order += "path_exists openvpn" - order += "wireless ${wifi-interface}" - order += "battery all" - order += "volume master" - order += "load" - order += "tztime local" - - wireless ${wifi-interface} { - format_up = "%essid" - format_down = "offline" - } - - run_watch retiolum { - pidfile = "/var/run/tinc.retiolum.pid" - format = "%title" - } - - path_exists openvpn { - path = "/proc/sys/net/ipv4/conf/tun0" - format = "%title" - } - - battery all { - format = "%status%percentage" - format_down = "No battery" - status_chr = "↑" - status_bat = "↓" - status_unk = "" - status_full = "↯" - path = "/sys/class/power_supply/BAT%d/uevent" - low_threshold = 15 - threshold_type = "percentage" - integer_battery_capacity = true - } - - volume master { - format = "%volume" - format_muted = "%volume" - device = "default" - mixer = "Master" - mixer_idx = 0 - } - - tztime local { - format = "%Y-%m-%d %H:%M" - } - - load { - format = "%1min" - } - ''; - in '' - ${pkgs.i3status}/bin/i3status -c ${i3status-config} - ''; - }]; - keybindings = { - "${modifier}+Down" = "focus down"; - "${modifier}+Left" = "focus left"; - "${modifier}+Return" = "exec ${config.defaultApplications.terminal}"; - "${modifier}+Right" = "focus right"; - "${modifier}+Shift+Down" = "move down"; - "${modifier}+Shift+Left" = "move left"; - "${modifier}+Shift+Right" = "move right"; - "${modifier}+Shift+Up" = "move up"; - "${modifier}+Shift+c" = "reload"; - "${modifier}+Shift+n" = "move window to workspace next"; - "${modifier}+Shift+b" = "move window to workspace prev"; - "${modifier}+Shift+q" = "kill"; - "${modifier}+Shift+r" = "restart"; - "${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow"; - "${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}"; - "${modifier}+Shift+z" = "floating toggle"; - "${modifier}+Up" = "focus up"; - "${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window"; - "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run"; - "${modifier}+e" = "layout toggle split"; - "${modifier}+f" = "fullscreen toggle"; - "${modifier}+h" = "split h"; - "${modifier}+n" = "workspace next"; - "${modifier}+b" = "workspace prev"; - "${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass"; - "${modifier}+r" = "mode resize"; - "${modifier}+s" = "layout stacking"; - "${modifier}+t" = "exec ${config.defaultApplications.fileManager}"; - "${modifier}+v" = "split v"; - "${modifier}+w" = "layout tabbed"; - "${modifier}+x" = "exec --no-startup-id ${new-workspace}"; - "${modifier}+y" = "exec ${config.defaultApplications.browser}"; - "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks"; - "XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks"; - "XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks"; - }; - } diff --git a/dot/mpv.nix b/dot/mpv.nix deleted file mode 100644 index e1592a2..0000000 --- a/dot/mpv.nix +++ /dev/null @@ -1,10 +0,0 @@ -'' -Alt+RIGHT add video-rotate 90 -Alt+LEFT add video-rotate -90 -Alt+- add video-zoom -0.25 -Alt+= add video-zoom 0.25 -Alt+l add video-pan-x -0.05 -Alt+h add video-pan-x 0.05 -Alt+k add video-pan-y 0.05 -Alt+j add video-pan-y -0.05 -'' diff --git a/dot/rofi.nix b/dot/rofi.nix deleted file mode 100644 index 155776c..0000000 --- a/dot/rofi.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config }: -with import ; -{ - enable = true; - separator = "solid"; - scrollbar = false; - terminal = config.defaultApplications.terminal; - borderWidth = 0; - lines = 5; - font = "${terminalFont.name} ${toString (terminalFont.size + 1)}"; - colors = rec { - window = { - background = invertedColorScheme.background; - border = invertedColorScheme.background; - separator = invertedColorScheme.black.light; - }; - rows = { - normal = { - background = window.background; - backgroundAlt = window.background; - foreground = invertedColorScheme.foreground; - highlight = { foreground = invertedColorScheme.cyan.dark; inherit (window) background; }; - }; - active = { - background = window.background; - backgroundAlt = window.background; - foreground = invertedColorScheme.yellow.dark; - highlight = { foreground = invertedColorScheme.green.dark; inherit (window) background; }; - }; - urgent = { - background = window.background; - backgroundAlt = window.background; - foreground = invertedColorScheme.red.dark; - highlight = { foreground = invertedColorScheme.magenta.dark; inherit (window) background; }; - }; - }; - }; -} diff --git a/dot/stack.nix b/dot/stack.nix deleted file mode 100644 index dc9eafb..0000000 --- a/dot/stack.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ user }: -'' -templates: - params: - author-name: ${user.name} - author-email: ${user.email} - copyright: 'Copyright: (c) 2019 ${user.name}' - github-username: ${user.github} -'' diff --git a/dot/tmux.nix b/dot/tmux.nix deleted file mode 100644 index 9cb4322..0000000 --- a/dot/tmux.nix +++ /dev/null @@ -1,27 +0,0 @@ -'' -set -g status-interval 2 -set -g status-left-length 32 -set -g status-right-length 150 - -set -g status-bg default - -setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W " -setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W " - -set -g status-left "" -set -g status-right "# [fg=colour255,bg=colour237,bold] %Y-%m-%d #[default]#[fg=colour12,bg=colour233] %H:%M " -set -g status-justify left - -set -g pane-active-border-fg colour237 -set -g pane-border-fg colour237 -set -g pane-active-border-bg default -set -g pane-border-bg default - -set -g status-position bottom - -set -g mouse on - -# displays * -unbind * -bind * list-clients -'' diff --git a/dot/urxvt.nix b/dot/urxvt.nix deleted file mode 100644 index 107861a..0000000 --- a/dot/urxvt.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, pkgs }: -let theme = import ; -in -{ - enable = true; - package = pkgs.rxvt_unicode-with-plugins; - keybindings = { - "Shift-Control-C" = "eval:selection_to_clipboard"; - "Shift-Control-V" = "eval:paste_clipboard"; - }; - scroll.bar.enable = false; - extraConfig = { - perl-ext = "default,url-select"; - "url-select.launcher" = "/usr/bin/env chromium"; - "url-select.underline" = true; - "colorUL" = theme.colorScheme.blue.light; - "perl-lib" = "${pkgs.urxvt_perls}/lib/urxvt/perl"; - urlLauncher = "/usr/bin/env chromium"; - fading = 20; - iso14755 = false; - urgentOnBell = true; - reverseVideo = false; - }; -} diff --git a/dot/vimrc b/dot/vimrc index c675055..7e88592 100644 --- a/dot/vimrc +++ b/dot/vimrc @@ -112,7 +112,7 @@ if has("autocmd") autocmd bufnewfile,bufread *.conf set filetype=conf autocmd bufnewfile,bufread *.fs packadd vim-fsharp | set filetype=fsharp autocmd bufnewfile,bufread *.h set keywordprg=man\ 3 - autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix + autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix | set path+=/var/src autocmd bufnewfile,bufread *.rust packadd rust-vim " | packadd deoplete-rust autocmd bufnewfile,bufread *.csv packadd csv-vim | set filetype=csv autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex diff --git a/modules/constants.nix b/modules/constants.nix new file mode 100644 index 0000000..433b1b3 --- /dev/null +++ b/modules/constants.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: +with lib; +with import ; +let + stringOption = mkOption { type = types.string; }; + themeOption = mkOption { + type = types.submodule { + options = { + name = mkOption { type = types.string; }; + package = mkOption { type = types.package; }; + }; + }; + }; +in { + options.niveum = { + applications = { + terminal = stringOption; + browser = stringOption; + fileManager = stringOption; + }; + + user = { + github = stringOption; + name = stringOption; + email = stringOption; + }; + + ignore = mkOption { + type = types.listOf types.string; + default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.py[co]" "*.o" "*.hi" "*.aux" "*.bbl" "*.bcf" "*.blg" "*.fdb_latexmk" "*.fls" "*.out" "*.run.xml" "*.toc" "*.bbl" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ]; + }; + + theme = { + gtk = themeOption; + icon = themeOption; + cursor = themeOption; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..39361fc --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + + + + + + ]; +} diff --git a/modules/defaultApplications.nix b/modules/defaultApplications.nix deleted file mode 100644 index 12c0688..0000000 --- a/modules/defaultApplications.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ config, lib, pkgs, ... }: -with lib; -with import ; -let - unstable = import {}; - stringOption = def: mkOption { type = types.string; default = def; }; - themeOption = def: mkOption { - type = types.submodule { - options = { - name = mkOption { type = types.string; default = def.name; }; - package = mkOption { type = types.package; default = def.package; }; - }; - }; - default = def; - }; -in { - options.defaultApplications = mapAttrs (const stringOption) rec { - terminal = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtc"; - browser = "${pkgs.chromium}/bin/chromium"; - fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger"; - # locker = "${pkgs.i3lock}/bin/i3lock -u -c ${strings.removePrefix "#" colorScheme.background}"; - locker = "${pkgs.lightlocker}/bin/light-locker-command -l"; - }; - - options.constants = { - user = mapAttrs (const stringOption) { - github = "kmein"; - name = "Kierán Meinhardt"; - email = "kieran.meinhardt@gmail.com"; - }; - - ignore = mkOption { - type = types.listOf types.string; - default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.py[co]" "*.o" "*.hi" "*.aux" "*.bbl" "*.bcf" "*.blg" "*.fdb_latexmk" "*.fls" "*.out" "*.run.xml" "*.toc" "*.bbl" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ]; - }; - - theme = mapAttrs (const themeOption) { - gtk = { name = "Arc"; package = pkgs.arc-theme; }; - icon = { name = "Arc"; package = pkgs.arc-icon-theme; }; - cursor = { name = "capitaine-cursors"; package = pkgs.capitaine-cursors; }; - }; - }; - -} diff --git a/modules/dropbox.nix b/modules/dropbox.nix new file mode 100644 index 0000000..529521c --- /dev/null +++ b/modules/dropbox.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, config, ... }: +with lib; +let cfg = config.niveum.dropbox; +in +{ + options.niveum.dropbox = { + enable = mkEnableOption "Dropbox"; + }; + + config = mkIf cfg.enable { + services.xserver.displayManager.sessionCommands = "${pkgs.dropbox}/bin/dropbox &"; + + environment.systemPackages = [ pkgs.dropbox-cli ]; + }; +} diff --git a/modules/google-drive.nix b/modules/google-drive.nix new file mode 100644 index 0000000..f235568 --- /dev/null +++ b/modules/google-drive.nix @@ -0,0 +1,31 @@ +{ pkgs, config, lib, ... }: +with lib; +let cfg = config.niveum.google-drive; +in +{ + options.niveum.google-drive = { + enable = mkEnableOption "Google Drive"; + directory = mkOption { type = types.path; }; + user = mkOption { type = types.attrs; }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ + pkgs.grive2 + ]; + + systemd.services.google-drive = { + description = "Google Drive synchronisation service"; + wants = [ "network-online.target" ]; + script = '' + ${pkgs.grive2}/bin/grive -p ${cfg.directory} + ''; + startAt = "*:0/5"; + serviceConfig = { + Type = "oneshot"; + User = cfg.user.name; + }; + }; + }; + +} diff --git a/modules/seafile.nix b/modules/seafile.nix new file mode 100644 index 0000000..4335045 --- /dev/null +++ b/modules/seafile.nix @@ -0,0 +1,14 @@ +{ pkgs, config, lib, ... }: +with lib; +let cfg = config.niveum.seafile; +in { + options.niveum.seafile = { + enable = mkEnableOption "Seafile"; + }; + + config = lib.mkIf cfg.enable { + services.xserver.displayManager.sessionCommands = "${pkgs.seafile-client}/bin/seafile-applet &"; + + environment.systemPackages = [ pkgs.seafile-client pkgs.seafile-shared ]; + }; +} diff --git a/packages/font-size.nix b/packages/font-size.nix new file mode 100644 index 0000000..1706ef8 --- /dev/null +++ b/packages/font-size.nix @@ -0,0 +1,26 @@ +{ writeDashBin, font }: +writeDashBin "font-size" '' + set -efu + + # set_font NORMAL_FONT BOLD_FONT + set_font() { + printf '\033]710;%s\007' "$1" + printf '\033]711;%s\007' "$2" + } + + case ''${1-} in + '''|0|--reset) + set_font \ + "xft:${font.name}:size=${toString font.size}" \ + "xft:${font.name}:size=${toString font.size}:bold" \ + ;; + [2-9]|[1-9][0-9]|[1-9][0-9][0-9]) + set_font \ + "xft:${font.name}:size=$1" \ + "xft:${font.name}:size=$1:bold" \ + ;; + *) + echo "$0: bad argument: $1" >&2 + exit 1 + esac +'' diff --git a/packages/genius.nix b/packages/genius.nix new file mode 100644 index 0000000..4fa7fbe --- /dev/null +++ b/packages/genius.nix @@ -0,0 +1,22 @@ +{ writeDashBin, gnused, curl, pandoc }: +writeDashBin "genius" '' + test $# -eq 2 || ( + echo "usage: $0 " + exit 1 + ) + + normalize() { + tr -d -c '0-9A-Za-z ' | tr ' ' - | tr '[:upper:]' '[:lower:]' + } + + ARTIST=$(echo "$1" | normalize | ${gnused}/bin/sed 's/./\U&/') + TITLE=$(echo "$2" | normalize) + GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics" + + ${curl}/bin/curl -s "$GENIUS_URL" \ + | ${gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \ + | ${pandoc}/bin/pandoc -f html -s -t plain \ + | ${gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g' + + printf "\n(source: $GENIUS_URL)\n" >/dev/stderr +'' diff --git a/packages/instaget.nix b/packages/instaget.nix new file mode 100644 index 0000000..1107f6b --- /dev/null +++ b/packages/instaget.nix @@ -0,0 +1,13 @@ +{ writeDashBin, wget, curl, jq }: +writeDashBin "instaget" '' + for url in "$@"; do + ${curl}/bin/curl -s "$url" \ + | grep display_url \ + | grep -o '{.*}' \ + | ${jq}/bin/jq -r ' + .entry_data.PostPage + | .[].graphql.shortcode_media.edge_sidecar_to_children.edges + | .[].node.display_url' \ + | xargs ${wget}/bin/wget + done +'' diff --git a/packages/n.nix b/packages/n.nix new file mode 100644 index 0000000..e53d77d --- /dev/null +++ b/packages/n.nix @@ -0,0 +1,2 @@ +{ writeDashBin }: +writeDashBin "n" ''nix-shell -p "$1" --run "''${2:-$1}"'' diff --git a/packages/nix-git.nix b/packages/nix-git.nix new file mode 100644 index 0000000..567fef9 --- /dev/null +++ b/packages/nix-git.nix @@ -0,0 +1,4 @@ +{ writeDashBin, nix-prefetch-git, jq }: +writeDashBin "nix-git" '' + ${nix-prefetch-git}/bin/nix-prefetch-git "$@" 2> /dev/null | ${jq}/bin/jq -r '"rev = \"\(.rev)\";\nsha256 = \"\(.sha256)\";"' +'' diff --git a/packages/wttr.nix b/packages/wttr.nix new file mode 100644 index 0000000..2f89047 --- /dev/null +++ b/packages/wttr.nix @@ -0,0 +1,4 @@ +{ writeDashBin, curl, jq }: +writeDashBin "wttr" '' + ${curl}/bin/curl -s -H "Accept-Language: ''${LANG%_*}" --compressed "wttr.in/''${1-"@$(${curl}/bin/curl -s ipinfo.io | ${jq}/bin/jq -r .ip)"}?0" +'' diff --git a/systems/generic.nix b/systems/generic.nix deleted file mode 100644 index 0220a11..0000000 --- a/systems/generic.nix +++ /dev/null @@ -1,121 +0,0 @@ -{ config, lib, pkgs, ... }: -let - helpers = import ; -in { - imports = [ - - - - - - - - - - - ]; - - boot.cleanTmpDir = true; - boot.loader.timeout = 1; - boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ]; - - time.timeZone = "Europe/Berlin"; - - sound.enable = true; - - hardware.pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; # for bluetooth sound output - }; - - hardware.bluetooth = { - enable = true; - extraConfig = '' - [General] - Enable=Source,Sink,Media,Socket - ''; - }; - - services.printing = { - enable = true; - drivers = [ pkgs.hplipWithPlugin ]; - }; - - security.sudo = { - enable = true; - extraConfig = '' - Defaults pwfeedback - ''; - }; - - systemd.services.google-drive = { - description = "Google Drive synchronisation service"; - wants = [ "network-online.target" ]; - script = '' - ${pkgs.grive2}/bin/grive -p ${config.users.users.kfm.home}/cloud/gdrive - ''; - startAt = "*:0/5"; - serviceConfig = { - Type = "oneshot"; - User = config.users.users.kfm.name; - }; - }; - - programs.tmux = { - enable = true; - extraTmuxConf = import ; - keyMode = "vi"; - terminal = "screen-256color"; - }; - - users.mutableUsers = false; - - users.users.kfm = { - name = "kfm"; - description = config.constants.user.name; - home = "/home/kfm"; - createHome = true; - group = "users"; - extraGroups = [ "wheel" "audio" "docker" ]; - hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; - shell = pkgs.zsh; - }; - - home-manager.users.kfm = { - programs.git = { - enable = true; - userName = config.constants.user.name; - userEmail = config.constants.user.email; - aliases = { - br = "branch"; - co = "checkout"; - ci = "commit"; - cm = "commit -m"; - amend = "commit --amend"; - st = "status"; - unstage = "reset HEAD --"; - diffs = "diff --staged"; - last = "log -1 HEAD"; - logs = "log --pretty=oneline"; - pull-all = "!pull-all"; # from dot/scripts.nix - }; - ignores = config.constants.ignore; - }; - - xdg.configFile = { - "mpv/input.conf".text = import ; - "htop/htoprc".text = builtins.readFile ; - "zathura/zathurarc".text = "set selection-clipboard clipboard"; - "pycodestyle".text = '' - [pycodestyle] - max-line-length = 110 - ''; - }; - - home.file = { - ".ghc/ghci.conf".text = import { inherit pkgs; }; - ".stack/config.yaml".text = import { user = config.constants.user; }; - ".zshrc".text = "# nothing to see here"; - }; - }; -} diff --git a/systems/homeros/configuration.nix b/systems/homeros/configuration.nix index 837ae57..edc8743 100644 --- a/systems/homeros/configuration.nix +++ b/systems/homeros/configuration.nix @@ -1,14 +1,22 @@ { config, pkgs, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; + imports = [ + + { + services.xserver.xrandrHeads = [ "LVDS1" { output = "HDMI1"; primary = true; } ]; + } + { + environment.systemPackages = + let unstable = import {}; + in [ unstable.zeroad ]; + } + ./hardware-configuration.nix + ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "homeros"; - system.stateVersion = "19.03"; + system.stateVersion = "18.09"; } diff --git a/systems/scardanelli/configuration.nix b/systems/scardanelli/configuration.nix index 37f9744..f5b8107 100644 --- a/systems/scardanelli/configuration.nix +++ b/systems/scardanelli/configuration.nix @@ -1,14 +1,17 @@ { config, pkgs, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; + imports = [ + + { + services.xserver.xrandrHeads = [ "eDP1" ]; + } + ./hardware-configuration.nix + ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "scardanelli"; - system.stateVersion = "19.03"; + system.stateVersion = "18.09"; }