Compare commits

...

70 Commits

Author SHA1 Message Date
Benjamin Bädorf a026e3c3e4
Merge branch 'feature/disable-greetd' 2 months ago
teutat3s 121e983058
graphical, sway: disable greetd, auto-login directly to desktop 2 months ago
Benjamin Bädorf 5c46477e44
Add obs 2 months ago
Benjamin Bädorf 43d421bcac
Update user description 2 months ago
Benjamin Bädorf 59f441e425
Change user description for ben 2 months ago
Benjamin Bädorf cfe5d77f9e
Allow changing the user description 2 months ago
Benjamin Bädorf 6c9ab61065
Use fixed telegram-desktop from unstable 2 months ago
Benjamin Bädorf fbdd35283e
Fix java session variable 2 months ago
Benjamin Bädorf decf354138 Merge remote-tracking branch 'origin/main' into b12f 3 months ago
Benjamin Bädorf 7cb8b30fe4
Merge branch 'main' into b12f 3 months ago
Benjamin Bädorf 79517658b3
Update vm rom location 3 months ago
Benjamin Bädorf 61e87ee30b
Merge branch 'b12f' of git.b12f.io:pub-solar/os into b12f 3 months ago
Benjamin Bädorf 3dc7ffd3a4
Update email signature for OP 3 months ago
Benjamin Bädorf 64e1a4583f
Add ssh hosts 3 months ago
Benjamin Bädorf 097d89d2b2
Remove git crypt form biolimo 3 months ago
Benjamin Bädorf 5a18a7c3c1
Merge branch 'main' into b12f 3 months ago
Benjamin Bädorf 5a6ec0d6ff Merge remote-tracking branch 'origin/main' into b12f 3 months ago
Benjamin Bädorf 2724982a4f Merge remote-tracking branch 'origin/main' into b12f 3 months ago
Benjamin Bädorf bcd191b291
Don't scale laptop screen, sway + firefox is broken then 3 months ago
Benjamin Bädorf 0015849858 Merge remote-tracking branch 'origin/main' into b12f 3 months ago
Benjamin Bädorf d064b27393
Fix build 3 months ago
teutat3s 8a848a789b
overrides: try out docker-compose v2, xdg-desktop-portal from latest 3 months ago
Benjamin Bädorf ab19dea908
Fix mopidy ownership 3 months ago
Benjamin Bädorf 415223a778
Move biolimo to systemd-boot 3 months ago
Benjamin Bädorf 067ce16246
Remove git crypt 3 months ago
Benjamin Bädorf 132042220e
Double encrypt ?? 3 months ago
Benjamin Bädorf a44b506724
Merge branch 'b12f' of git.b12f.io:pub-solar/os into b12f 3 months ago
Benjamin Bädorf 87a9d94d0a
secrets via agenix 3 months ago
Benjamin Bädorf 4c3ddff217
Add 1 git-crypt collaborator 3 months ago
Benjamin Bädorf cd5e19b10e
Fix byb@miom.space 3 months ago
Benjamin Bädorf 7569a75e65
Add byb@miom.space, update signature 3 months ago
Benjamin Bädorf 814f567fd7
Merge branch 'main' into b12f 3 months ago
Benjamin Bädorf 298f50ba95
Merge branch 'main' into b12f 3 months ago
Benjamin Bädorf 231abe6af4
Merge branch 'main' into b12f 3 months ago
Benjamin Bädorf 3cec4a51f2
Add mobile profile to ben user 4 months ago
Benjamin Bädorf 6dce415552
Add android mobile option 4 months ago
Benjamin Bädorf 6039a73b04 Merge remote-tracking branch 'origin/master' into b12f 4 months ago
Benjamin Bädorf 2e6fe672d2
Fix direnv cache 4 months ago
Benjamin Bädorf af4b2fb8f1
Fix missing element desktop 4 months ago
drone 23137a0764 Merge remote-tracking branch 'origin/master' into b12f 4 months ago
drone 73e7571487 Merge remote-tracking branch 'origin/master' into b12f 5 months ago
teutat3s 761b671549 b12f-to-master (#16) 5 months ago
Benjamin Bädorf 3dcc90fc24
feat(chocolatebar): enable virtualisation 5 months ago
Benjamin Bädorf e29ad5c23f
Enable the gaming suit for b12f 5 months ago
Benjamin Bädorf 9009fa4a52
Merge branch 'b12f-master' into b12f 5 months ago
Benjamin Bädorf f89384cbf0
Works for chocolatebar 5 months ago
teutat3s 12fafd7f97
docker-compose fix? 5 months ago
teutat3s 34ca8aadb9
fix biolimo host? 5 months ago
Benjamin Bädorf d132638c8e
Fix flake lock imports 5 months ago
Benjamin Bädorf 2293e703cc
Fix suites 5 months ago
teutat3s 3f4d3cf240
Merge branch 'b12f' into b12f-master 5 months ago
Benjamin Bädorf 72d089797b Merge remote-tracking branch 'origin/core' into b12f 6 months ago
Benjamin Bädorf 6025d489ac
New vim 6 months ago
drone 05836bcdf4 Merge remote-tracking branch 'origin/core' into b12f 6 months ago
teutat3s 99597d1b30
Merge branch 'core' into b12f 6 months ago
teutat3s f7901d94e8
Merge branch 'core' into b12f 7 months ago
Benjamin Bädorf 3cfbaba8e5
Add nodejs to home packages 7 months ago
Benjamin Bädorf 63750e6536
Add mdxjs support for nvim 7 months ago
Benjamin Bädorf 6280a04af5
Merge branch 'core' into b12f 7 months ago
Benjamin Bädorf a9e025c4f9
fix: Make chocolatebar work with the new config 7 months ago
Benjamin Bädorf 17a2833a89
feat: Add tea gitea cli 7 months ago
Benjamin Bädorf bf28a630c9
Merge branch 'core' into b12f 7 months ago
Benjamin Bädorf 83333fa0d6
Merge branch 'b12f' of git.b12f.io:pub-solar/os into b12f 7 months ago
Benjamin Bädorf e437f7fca6
Merge branch 'core' into b12f 7 months ago
Benjamin Bädorf fc23fbc05b
Merge upstream 8 months ago
Benjamin Bädorf 8d5db4dfb2
Add chocolatebar 8 months ago
Benjamin Bädorf 9d1991d6b8
Move fonts into separate flake 8 months ago
Benjamin Bädorf a577bd7333
Encrypt futura 8 months ago
Benjamin Bädorf bc76999a00
Add Futura 8 months ago
Benjamin Bädorf 91c8e77d25
Initial b12f commit 8 months ago
  1. 8
      .editorconfig
  2. 6
      .gitignore
  3. 98
      flake.lock
  4. 14
      flake.nix
  5. 6
      hosts/biolimo/.config/sway/config.d/autostart.conf
  6. 19
      hosts/biolimo/.config/sway/config.d/custom-keybindings.conf
  7. 9
      hosts/biolimo/.config/sway/config.d/input-defaults.conf
  8. 21
      hosts/biolimo/.config/sway/config.d/screens.conf
  9. 24
      hosts/biolimo/biolimo.nix
  10. 26
      hosts/biolimo/configuration.nix
  11. 6
      hosts/biolimo/default.nix
  12. 36
      hosts/biolimo/hardware-configuration.nix
  13. 6
      hosts/chocolatebar/.config/sway/config.d/autostart.conf
  14. 19
      hosts/chocolatebar/.config/sway/config.d/custom-keybindings.conf
  15. 9
      hosts/chocolatebar/.config/sway/config.d/input-defaults.conf
  16. 21
      hosts/chocolatebar/.config/sway/config.d/screens.conf
  17. 29
      hosts/chocolatebar/chocolatebar.nix
  18. 25
      hosts/chocolatebar/configuration.nix
  19. 6
      hosts/chocolatebar/default.nix
  20. 33
      hosts/chocolatebar/hardware-configuration.nix
  21. 78
      hosts/chocolatebar/virtualisation/create-service.nix
  22. 52
      hosts/chocolatebar/virtualisation/default.nix
  23. 242
      hosts/chocolatebar/virtualisation/generate-xml.nix
  24. 19
      hosts/chocolatebar/virtualisation/network-xml.nix
  25. BIN
      hosts/chocolatebar/virtualisation/rx550x.rom
  26. BIN
      hosts/chocolatebar/virtualisation/rx5700xt.rom
  27. 1
      modules/crypto/default.nix
  28. 2
      modules/devops/default.nix
  29. 1
      modules/docker/default.nix
  30. 2
      modules/gaming/default.nix
  31. 10
      modules/graphical/default.nix
  32. 19
      modules/mobile/default.nix
  33. 2
      modules/sway/config/config.d/custom-keybindings.conf
  34. 4
      modules/sway/config/config.d/systemd.conf
  35. 2
      modules/sway/default.nix
  36. 1
      modules/sway/swayidle.service.nix
  37. 1
      modules/sway/waybar.service.nix
  38. 4
      modules/terminal-life/default.nix
  39. 10
      modules/terminal-life/nvim/default.nix
  40. 5
      modules/terminal-life/zsh/default.nix
  41. 2
      modules/x-os/boot.nix
  42. 6
      overlays/overrides.nix
  43. 2
      profiles/base-user/home.nix
  44. 5
      profiles/gaming/default.nix
  45. 6
      profiles/mobile/default.nix
  46. 6
      profiles/virtualisation/default.nix
  47. 4
      secrets/.gitattributes
  48. BIN
      secrets/crypto_keyfile-chocolatebar.bin
  49. BIN
      secrets/hdd_keyfile-chocolatebar.bin
  50. BIN
      secrets/keyfile-biolimo.bin
  51. BIN
      secrets/keyfile-chocolatebar.bin
  52. 44
      secrets/mopidy.conf
  53. 42
      secrets/secrets.nix
  54. 42
      users/ben/.config/msmtp/config
  55. 24
      users/ben/.config/mutt/b.baedorf@openproject.com.muttrc
  56. 19
      users/ben/.config/mutt/b.baedorf@openproject.com.signature
  57. 21
      users/ben/.config/mutt/benjamin.baedorf@rwth-aachen.de.muttrc
  58. 21
      users/ben/.config/mutt/byb@miom.space.muttrc
  59. 12
      users/ben/.config/mutt/byb@miom.space.signature
  60. 21
      users/ben/.config/mutt/hello@benjaminbaedorf.eu.muttrc
  61. 12
      users/ben/.config/mutt/hello@benjaminbaedorf.eu.signature
  62. 64
      users/ben/.config/offlineimap/config
  63. 40
      users/ben/default.nix
  64. 77
      users/ben/home.nix
  65. 14
      users/ben/session-variables.nix

8
.editorconfig

@ -24,6 +24,14 @@ charset = unset
indent_style = unset
indent_size = unset
[*.rom]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
indent_style = unset
indent_size = unset
[*.py]
indent_size = 4

6
.gitignore

@ -7,7 +7,7 @@ vm
iso
doi
pkgs/_sources/.shake*
# PubSolarOS
tags
/owners
/owners
pkgs/_sources/.shake*

98
flake.lock

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1620877075,
"narHash": "sha256-XvgTqtmQZHegu9UMDSR50gK5cHEM2gbnRH0qecmdN54=",
"lastModified": 1631896269,
"narHash": "sha256-DAyCxJ8JacayOzGgGSfzrn7ghtsfL/EsCyk1NEUaAR8=",
"owner": "ryantm",
"repo": "agenix",
"rev": "e543aa7d68f222e1e771165da9e9a64b5bf7b3e3",
"rev": "daf1d773989ac5d949aeef03fce0fe27e583dbca",
"type": "github"
},
"original": {
@ -20,6 +20,27 @@
"type": "github"
}
},
"b12f-nix-fonts": {
"inputs": {
"nixpkgs": [
"latest"
]
},
"locked": {
"lastModified": 1622501268,
"narHash": "sha256-wITrQEsJ5zWEl9yGUUPOUUpBN08Sva7MaB7uwYHmX7s=",
"ref": "main",
"rev": "51f94ad589c096e7fbb6a1f58f3b07037ef035bd",
"revCount": 4,
"type": "git",
"url": "https://git.b12f.io/b12f/nix-fonts"
},
"original": {
"ref": "main",
"type": "git",
"url": "https://git.b12f.io/b12f/nix-fonts"
}
},
"beautysh": {
"inputs": {
"flake-utils": "flake-utils",
@ -70,11 +91,11 @@
]
},
"locked": {
"lastModified": 1633373878,
"narHash": "sha256-9+ziZ8l6rq3yXyY6B0wYXrVdfxr6cdpEbPEGRHywBKc=",
"lastModified": 1633877936,
"narHash": "sha256-+o3n6s7fR8dBGRldTGelyp2j3jSyTlrniOXwNfmMG20=",
"owner": "divnix",
"repo": "bud",
"rev": "4e709a2fcf19df500ba87d9c3b1b1481401cd53b",
"rev": "15df091133ff95216c321b09be04905c0a0944c4",
"type": "github"
},
"original": {
@ -90,11 +111,11 @@
]
},
"locked": {
"lastModified": 1622060422,
"narHash": "sha256-hPVlvrAyf6zL7tTx0lpK+tMxEfZeMiIZ/A2xaJ41WOY=",
"lastModified": 1631730143,
"narHash": "sha256-A8PaUyZu5WVp+IojG5q+39rjf5x57OFDYmVoDFPZLlY=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "007d700e644ac588ad6668e6439950a5b6e2ff64",
"rev": "e1a3f7292f085fd588d11f94ed0f47968c16df0c",
"type": "github"
},
"original": {
@ -245,6 +266,21 @@
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1623875721,
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home": {
"inputs": {
"nixpkgs": [
@ -252,11 +288,11 @@
]
},
"locked": {
"lastModified": 1624228557,
"narHash": "sha256-wwOqe73BsrXfRv1PhyXQFNC8iTET50KvE/HitdkRgxs=",
"lastModified": 1633596850,
"narHash": "sha256-5+qVLYvfOropjLAvpQs/APtD8eYnEIbAd9a36lGHZM0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "35a24648d155843a4d162de98c17b1afd5db51e4",
"rev": "49695f33aac22358b59e49c94fe6472218e5d766",
"type": "github"
},
"original": {
@ -284,11 +320,11 @@
},
"latest_2": {
"locked": {
"lastModified": 1627942574,
"narHash": "sha256-guUcGRWvY2mfiVSet2x/zeHIyflm2wgglj0ldg0mMio=",
"lastModified": 1634782485,
"narHash": "sha256-psfh4OQSokGXG0lpq3zKFbhOo3QfoeudRcaUnwMRkQo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c464dc811babfe316ed4ab7bbc12351122e69dd7",
"rev": "34ad3ffe08adfca17fcb4e4a47bb5f3b113687be",
"type": "github"
},
"original": {
@ -322,11 +358,11 @@
]
},
"locked": {
"lastModified": 1623927034,
"narHash": "sha256-sGxlmfp5eXL5sAMNqHSb04Zq6gPl+JeltIZ226OYN0w=",
"lastModified": 1632266297,
"narHash": "sha256-J1yeJk6Gud9ef2pEf6aKQemrfg1pVngYDSh+SAY94xk=",
"owner": "nmattia",
"repo": "naersk",
"rev": "e09c320446c5c2516d430803f7b19f5833781337",
"rev": "ee7edec50b49ab6d69b06d62f1de554efccb1ccd",
"type": "github"
},
"original": {
@ -359,7 +395,7 @@
},
"nix-dram": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs"
},
"locked": {
@ -378,11 +414,11 @@
},
"nixos": {
"locked": {
"lastModified": 1628203131,
"narHash": "sha256-jQgXeJ9NQQS0Eobb/qQOvS+RRULkqRikAeXkkFKOPDA=",
"lastModified": 1635070614,
"narHash": "sha256-eRup9WsvSIhsRrSlNugPcQ7gfGOsbk3d4izufwVlz1Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "178da37860823d35e801c7df2f73d7866d3d598a",
"rev": "3b1789322fcbcb5cf51228d732752714f1bf77da",
"type": "github"
},
"original": {
@ -419,11 +455,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1625333638,
"narHash": "sha256-M6J9RN60XJyv6nUfDFCwnz5aVjhe8+GJnV8Q9VpdQQQ=",
"lastModified": 1633793047,
"narHash": "sha256-XSMlHMVPKwcEqyHGdFj/ZeGMeZeKNwVExOfLlxcg4oE=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "41775780a0b6b32b3d32dcc32bb9bc6df809062d",
"rev": "3aabf78bfcae62f5f99474f2ebbbe418f1c6e54f",
"type": "github"
},
"original": {
@ -452,10 +488,9 @@
"locked": {
"lastModified": 1626378135,
"narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=",
"owner": "nix-community",
"repo": "NUR",
"path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source",
"rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d",
"type": "github"
"type": "path"
},
"original": {
"id": "nur",
@ -479,11 +514,11 @@
]
},
"locked": {
"lastModified": 1632700276,
"narHash": "sha256-XABvQUq2qv+YcQxW93DnU8mgtVsGJWyhcznny/Lbp0Q=",
"lastModified": 1633886330,
"narHash": "sha256-gYtHVP8oUSxSX8HxlqqA/YH3yQB9eDNYr1W40r/qVEM=",
"owner": "berberman",
"repo": "nvfetcher",
"rev": "248fe98ed1bc352ce164d08a9e76fdc5f301ba2d",
"rev": "aacf12e7a13edccccaae2259c0f2a7eb34ceda32",
"type": "github"
},
"original": {
@ -522,6 +557,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"b12f-nix-fonts": "b12f-nix-fonts",
"blank": [
"digga",
"blank"

14
flake.nix

@ -51,6 +51,10 @@
# PubSolarOS additions
nix-dram.url = "github:dramforever/nix-dram";
# b12f additions
b12f-nix-fonts.url = "git+https://git.b12f.io/b12f/nix-fonts?ref=main";
b12f-nix-fonts.inputs.nixpkgs.follows = "latest";
};
outputs =
@ -65,6 +69,7 @@
, nvfetcher
, deploy
, nix-dram
, b12f-nix-fonts
, ...
} @ inputs:
digga.lib.mkFlake
@ -82,6 +87,7 @@
agenix.overlay
nvfetcher.overlay
nix-dram.overlay
b12f-nix-fonts.overlay
./pkgs/default.nix
];
};
@ -130,7 +136,10 @@
suites = with profiles; rec {
base = [ core users.nixos users.root ];
pubsolaros = [ core base-user users.root ];
anonymous = [ pubsolaros users.nixos ];
anonymous = pubsolaros ++ [ users.nixos ];
b12f = pubsolaros ++ [ users.ben gaming mobile ];
biolimo = b12f ++ [ graphical ];
chocolatebar = b12f ++ [ graphical virtualisation ];
};
};
};
@ -141,11 +150,12 @@
importables = rec {
profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec {
base = [ direnv git ];
base = [ direnv ];
};
};
users = {
nixos = { suites, ... }: { imports = suites.base; };
ben = { suites, ... }: { imports = suites.base; };
}; # digga.lib.importers.rakeLeaves ./users/hm;
};

6
hosts/biolimo/.config/sway/config.d/autostart.conf

@ -0,0 +1,6 @@
# Autostart applications
#
# Example:
# exec swayidle
exec keepassxc

19
hosts/biolimo/.config/sway/config.d/custom-keybindings.conf

@ -0,0 +1,19 @@
# Touchpad controls
#bindsym XF86TouchpadToggle exec $HOME/Workspace/ben/toggletouchpad.sh # toggle touchpad
# Screen brightness controls
bindsym XF86MonBrightnessUp exec "brightnessctl -d intel_backlight set +10%; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ {print $4}')"
bindsym XF86MonBrightnessDown exec "brightnessctl -d intel_backlight set 10%-; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ { print $4}')"
# Keyboard backlight brightness controls
bindsym XF86KbdBrightnessDown exec "brightnessctl -d smc::kbd_backlight set 10%-; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')"
bindsym XF86KbdBrightnessUp exec "brightnessctl -d smc::kbd_backlight set +10%; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. up' #increase sound volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. down' #decrease sound volume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send 'Mute sound' # mute sound
# Media player controls
bindsym XF86AudioPlay exec "playerctl play-pause; notify-send 'Play/Pause'"
bindsym XF86AudioNext exec "playerctl next; notify-send 'Next'"
bindsym XF86AudioPrev exec "playerctl previous; notify-send 'Prev.'"

9
hosts/biolimo/.config/sway/config.d/input-defaults.conf

@ -0,0 +1,9 @@
input "1739:0:Synaptics_TM3288-011" {
dwt enabled
tap enabled
middle_emulation enabled
}
input * {
xkb_layout us(intl),de
xkb_options ctrl:nocaps
}

21
hosts/biolimo/.config/sway/config.d/screens.conf

@ -0,0 +1,21 @@
set $internal eDP-1
set $middle "Hewlett Packard HP E231 3CQ4290S5J"
set $standup "Hewlett Packard HP E231 3CQ4251F33"
output $internal {
scale 1
pos 0 500
}
output $middle {
scale 1
# 1969 is the 1.3 scaled width of the internal monitor
pos 1969 0
}
output $standup {
scale 1
transform 270
pos 3889 0
}

24
hosts/biolimo/biolimo.nix

@ -0,0 +1,24 @@
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in
{
imports = [
./configuration.nix
];
config = {
hardware.cpu.intel.updateMicrocode = true;
networking.firewall.allowedTCPPorts = [ 5000 ];
home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable {
"sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf;
"sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf;
"sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf;
"sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf;
};
};
}

26
hosts/biolimo/configuration.nix

@ -0,0 +1,26 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}

6
hosts/biolimo/default.nix

@ -0,0 +1,6 @@
{ suites, ... }:
{
imports = [
./biolimo.nix
] ++ suites.biolimo;
}

36
hosts/biolimo/hardware-configuration.nix

@ -0,0 +1,36 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/abc3fe04-368e-46eb-8c7a-3a829bb2deab";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/aed21f8d-8e15-4f43-8710-460cb36d488b";
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/3B67-0CAB";
fsType = "vfat";
};
swapDevices = [ ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}

6
hosts/chocolatebar/.config/sway/config.d/autostart.conf

@ -0,0 +1,6 @@
# Autostart applications
#
# Example:
# exec swayidle
exec keepassxc

19
hosts/chocolatebar/.config/sway/config.d/custom-keybindings.conf

@ -0,0 +1,19 @@
# Touchpad controls
#bindsym XF86TouchpadToggle exec $HOME/Workspace/ben/toggletouchpad.sh # toggle touchpad
# Screen brightness controls
bindsym XF86MonBrightnessUp exec "brightnessctl -d intel_backlight set +10%; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ {print $4}')"
bindsym XF86MonBrightnessDown exec "brightnessctl -d intel_backlight set 10%-; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ { print $4}')"
# Keyboard backlight brightness controls
bindsym XF86KbdBrightnessDown exec "brightnessctl -d smc::kbd_backlight set 10%-; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')"
bindsym XF86KbdBrightnessUp exec "brightnessctl -d smc::kbd_backlight set +10%; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. up' #increase sound volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. down' #decrease sound volume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send 'Mute sound' # mute sound
# Media player controls
bindsym XF86AudioPlay exec "playerctl play-pause; notify-send 'Play/Pause'"
bindsym XF86AudioNext exec "playerctl next; notify-send 'Next'"
bindsym XF86AudioPrev exec "playerctl previous; notify-send 'Prev.'"

9
hosts/chocolatebar/.config/sway/config.d/input-defaults.conf

@ -0,0 +1,9 @@
input "1739:0:Synaptics_TM3288-011" {
dwt enabled
tap enabled
middle_emulation enabled
}
input * {
xkb_layout us(intl),de
xkb_options ctrl:nocaps
}

21
hosts/chocolatebar/.config/sway/config.d/screens.conf

@ -0,0 +1,21 @@
set $internal eDP-1
set $middle DP-4
set $standup DP-5
output $internal {
scale 1.3
pos 0 500
}
output $middle {
scale 1
# 1969 is the 1.3 scaled width of the internal monitor
pos 1969 0
}
output $standup {
scale 1
transform 270
pos 3889 0
}

29
hosts/chocolatebar/chocolatebar.nix

@ -0,0 +1,29 @@
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in
{
imports = [
./configuration.nix
./virtualisation
];
config = {
pub-solar.virtualisation.isolateGPU = "rx550x";
hardware.cpu.amd.updateMicrocode = true;
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
];
home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable {
"sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf;
"sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf;
"sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf;
};
};
}

25
hosts/chocolatebar/configuration.nix

@ -0,0 +1,25 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}

6
hosts/chocolatebar/default.nix

@ -0,0 +1,6 @@
{ suites, ... }:
{
imports = [
./chocolatebar.nix
] ++ suites.chocolatebar;
}

33
hosts/chocolatebar/hardware-configuration.nix

@ -0,0 +1,33 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbcore" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/a3a74208-b244-4268-b374-e58265810fce";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/afcde41f-9811-4ac8-bb7b-a683844acc5c";
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/12FD-62A8";
fsType = "vfat";
};
swapDevices = [ ];
}

78
hosts/chocolatebar/virtualisation/create-service.nix

@ -0,0 +1,78 @@
{ config, pkgs, lib, vm, ... }:
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
varsFile = "${xdg.dataHome}/libvirt/OVMF_VARS_${vm.name}.fd";
generateXML = import ./generate-xml.nix;
in
{
serviceConfig = {
Type = "oneshot";
RemainAfterExit = "yes";
Restart = "no";
};
script =
let
networkXML = pkgs.writeText "network.xml" (import ./network-xml.nix { inherit config; inherit pkgs; inherit lib; });
machineXML = pkgs.writeText "${vm.name}.xml" (generateXML { inherit config; inherit pkgs; inherit lib; inherit vm; varsFile = varsFile; });
in
''
echo "Checking if ${vm.name} is already running"
STATUS=$(${pkgs.libvirt}/bin/virsh list --all | grep "${vm.name}" | ${pkgs.gawk}/bin/awk '{ print $3 " " $4 }' )
if [[ $STATUS != "shut off" && $STATUS != "" ]]; then
echo "Domain ${vm.name} is already running or in an inconsistent state:"
${pkgs.libvirt}/bin/virsh list --all
exit 0
fi
NET_TMP_FILE="/tmp/network.xml"
NETUUID="$(${pkgs.libvirt}/bin/virsh net-uuid 'default' || true)"
(sed "s/UUID/$NETUUID/" '${networkXML}') > $NET_TMP_FILE
${pkgs.libvirt}/bin/virsh net-define $NET_TMP_FILE
${pkgs.libvirt}/bin/virsh net-start 'default' || true
VARS_FILE=${varsFile}
if [ ! -f "$VARS_FILE" ]; then
cp /run/libvirt/nix-ovmf/OVMF_VARS.fd $VARS_FILE
fi
TMP_FILE="/tmp/${vm.name}.xml"
UUID="$(${pkgs.libvirt}/bin/virsh domuuid '${vm.name}' || true)"
(sed "s/UUID/$UUID/" '${machineXML}') > $TMP_FILE
USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c52b | grep 'Bus 001' | cut -b 18)
LINE_NUMBER=$(cat $TMP_FILE | grep -n -A 1 0xc52b | tail -n 1 | cut -b 1,2,3)
sed -i "''${LINE_NUMBER}s/\(.\{33\}\)./\1''${USB_DEV}/" $TMP_FILE
USB_BUS=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c328 | cut -b 7)
USB_DEV=$(${pkgs.usbutils}/bin/lsusb | grep 046d:c328 | cut -b 18)
LINE_NUMBER=$(cat $TMP_FILE | grep -n -A 1 0xc328 | tail -n 1 | cut -b 1,2,3)
sed -i "''${LINE_NUMBER}s/.*/<address bus=\"''${USB_BUS}\" device=\"''${USB_DEV}\" \/>/" $TMP_FILE
# TODO: Set correct pci address too
${pkgs.libvirt}/bin/virsh define $TMP_FILE
${pkgs.libvirt}/bin/virsh start '${vm.name}'
'';
preStop =
''
${pkgs.libvirt}/bin/virsh shutdown '${vm.name}'
let "timeout = $(date +%s) + 10"
while [ "$(${pkgs.libvirt}/bin/virsh list --name | grep --count '^${vm.name}$')" -gt 0 ]; do
if [ "$(date +%s)" -ge "$timeout" ]; then
# Meh, we warned it...
${pkgs.libvirt}/bin/virsh destroy '${vm.name}'
else
# The machine is still running, let's give it some time to shut down
sleep 0.5
fi
done
${pkgs.libvirt}/bin/virsh net-destroy 'default' || true
'';
}

52
hosts/chocolatebar/virtualisation/default.nix

@ -0,0 +1,52 @@
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
createService = import ./create-service.nix;
isolateAnyGPU = psCfg.virtualisation.isolateGPU != null;
in
{
options.pub-solar.virtualisation.isolateGPU = mkOption {
description = "Which GPU to isolate for virtualisation guests";
type = with types; nullOr (enum [ "rx5700xt" "rx550x" ]);
default = null;
};
config = mkIf psCfg.virtualisation.enable {
boot.extraModprobeConfig = mkIf isolateAnyGPU (concatStringsSep "\n" [
"softdep amdgpu pre: vfio vfio_pci"
(if psCfg.virtualisation.isolateGPU == "rx5700xt"
then "options vfio-pci ids=1002:731f,1002:ab38"
else "options vfio-pci ids=1002:699f,1002:aae0"
)
]);
systemd.user.services = {
vm-windows = createService {
inherit config;
inherit pkgs;
inherit lib;
vm = {
name = "windows";
disk = "/dev/disk/by-id/ata-SanDisk_SDSSDA240G_162402455603";
id = "http://microsoft.com/win/10";
gpu = true;
mountHome = false;
};
};
vm-manjaro = createService {
inherit config;
inherit pkgs;
inherit lib;
vm = {
name = "manjaro";
disk = "/dev/disk/by-id/ata-KINGSTON_SM2280S3G2240G_50026B726B0265CE";
id = "https://manjaro.org/download/#i3";
gpu = true;
mountHome = true;
};
};
};
};
}

242
hosts/chocolatebar/virtualisation/generate-xml.nix

@ -0,0 +1,242 @@
{ config, pkgs, lib, vm, varsFile, ... }:
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
home = config.home-manager.users."${psCfg.user.name}".home;
in
''
<domain type='kvm'>
<name>${vm.name}</name>
<uuid>UUID</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="${vm.id}"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
<vcpu placement='static'>12</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='6'/>
<vcpupin vcpu='1' cpuset='7'/>
<vcpupin vcpu='2' cpuset='8'/>
<vcpupin vcpu='3' cpuset='9'/>
<vcpupin vcpu='4' cpuset='10'/>
<vcpupin vcpu='5' cpuset='11'/>
<vcpupin vcpu='6' cpuset='18'/>
<vcpupin vcpu='7' cpuset='19'/>
<vcpupin vcpu='8' cpuset='20'/>
<vcpupin vcpu='9' cpuset='21'/>
<vcpupin vcpu='10' cpuset='22'/>
<vcpupin vcpu='11' cpuset='23'/>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
<loader readonly='yes' type='pflash'>/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
<nvram>${varsFile}</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='8191'/>
<vendor_id state='on' value='wahtever'/>
</hyperv>
<kvm>
<hidden state='on'/>
</kvm>
<vmport state='off'/>
</features>
<cpu mode='custom' match='exact' check='full'>
<model fallback='forbid'>EPYC-IBPB</model>
<vendor>AMD</vendor>
<topology sockets='1' dies='1' cores='6' threads='2'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='tsc-deadline'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='clwb'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='stibp'/>
<feature policy='require' name='arch-capabilities'/>
<feature policy='require' name='ssbd'/>
<feature policy='require' name='xsaves'/>
<feature policy='require' name='cmp_legacy'/>
<feature policy='require' name='perfctr_core'/>
<feature policy='require' name='clzero'/>
<feature policy='require' name='wbnoinvd'/>
<feature policy='require' name='amd-ssbd'/>
<feature policy='require' name='virt-ssbd'/>
<feature policy='require' name='rdctl-no'/>
<feature policy='require' name='skip-l1dfl-vmentry'/>
<feature policy='require' name='mds-no'/>
<feature policy='require' name='pschange-mc-no'/>
<feature policy='disable' name='monitor'/>
<feature policy='disable' name='svm'/>
<feature policy='require' name='topoext'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>${pkgs.qemu}/bin/qemu-system-x86_64</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='${vm.disk}'/>
<backingStore/>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='2' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='3' port='0x12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0x13'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0x14'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0x15'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x16'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
</controller>
<controller type='pci' index='8' model='pcie-to-pci-bridge'>
<model name='pcie-pci-bridge'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='9' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='9' port='0x17'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
${if vm.mountHome then ''
<filesystem type='mount' accessmode='mapped'>
<source dir='/home/${psCfg.user.name}'/>
<target dir='/media/home'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</filesystem>
'' else ""}
<interface type='network'>
<mac address='52:54:00:44:cd:ac'/>
<source network='default'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x01' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
<image compression='off'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc328'/>
<address bus='1' device='2'/>
</source>
<address type='usb' bus='0' port='4'/>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0xc52b'/>
<address bus='1' device='4'/>
</source>
<address type='usb' bus='0' port='5'/>
</hostdev>
${if vm.gpu && psCfg.virtualisation.isolateGPU != null then ''
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
</source>
<rom bar='on' file='/etc/nixos/hosts/chocolatebar/virtualisation/${psCfg.virtualisation.isolateGPU}.rom'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0' multifunction='on'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<driver name='vfio'/>
<source>
<address domain='0x0000' bus='0x0b' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
</hostdev>
'' else ""}
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='3'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
<shmem name='scream-ivshmem'>
<model type='ivshmem-plain'/>
<size unit='M'>2</size>
<address type='pci' domain='0x0000' bus='0x08' slot='0x02' function='0x0'/>
</shmem>
</devices>
</domain>
''

19
hosts/chocolatebar/virtualisation/network-xml.nix

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }:
''
<network>
<name>default</name>
<uuid>UUID</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:bd:a0:73'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
''

BIN
hosts/chocolatebar/virtualisation/rx550x.rom

Binary file not shown.

BIN
hosts/chocolatebar/virtualisation/rx5700xt.rom

Binary file not shown.

1
modules/crypto/default.nix

@ -15,7 +15,6 @@ in
services.pcscd.enable = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
systemd.user.services.polkit-gnome-authentication-agent = import ./polkit-gnome-authentication-agent.service.nix pkgs;

2
modules/devops/default.nix

@ -12,12 +12,14 @@ in
config = mkIf cfg.enable {
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [
croc
drone-cli
nmap
python38Packages.ansible
restic
shellcheck
terraform_0_15
tea
];
};
};

1
modules/docker/default.nix

@ -17,6 +17,7 @@ in
environment.systemPackages = with pkgs; [
docker-compose
docker-compose_2
];
};
}

2
modules/gaming/default.nix

@ -19,6 +19,8 @@ in
home.packages = [
playonlinux
godot
obs-studio
obs-wlrobs
];
};
};

10
modules/graphical/default.nix

@ -49,15 +49,7 @@ in
};
};
services.greetd = {
enable = true;
restart = false;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.sway-service}/bin/sway-service";
};
};
};
services.getty.autologinUser = "${psCfg.user.name}";
qt5 = {
enable = true;

19
modules/mobile/default.nix

@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.mobile;
in
{
options.pub-solar.mobile = {
enable = mkEnableOption "Add android adb and tooling";
};
config = mkIf cfg.enable {
programs.adb.enable = true;
users.users = with pkgs; lib.setAttrByPath [ psCfg.user.name ] {
extraGroups = [ "adbusers" ];
};
};
}

2
modules/sway/config/config.d/custom-keybindings.conf

@ -37,7 +37,7 @@ set $mode_system (l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutd
bindsym $mod+0 mode "$mode_system"
mode "$mode_system" {
bindsym l exec swaylock-bg, mode "default"
bindsym e exec systemctl --user stop graphical-session.target, mode "default"
bindsym e exec swaymsg exit, mode "default"
bindsym s exec systemctl suspend, mode "default"
bindsym h exec systemctl hibernate, mode "default"
bindsym r exec systemctl reboot, mode "default"

4
modules/sway/config/config.d/systemd.conf

@ -3,4 +3,6 @@
# systemctl import-environment is complete, and services that require certain variables
# will fail to run.
# https://github.com/swaywm/sway/wiki/Systemd-integration
exec "systemctl --user import-environment; systemctl --user start sway-session.target; dbus-update-activation-environment WAYLAND_DISPLAY"
# Also, import the most important environment variables into the D-Bus and systemd
# user environments (e.g. required for screen sharing and Pinentry prompts):
exec "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target; exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemd-cat --identifier=sway sway"

2
modules/sway/default.nix