Merge remote-tracking branch 'origin/nixos' into nixos-work

This commit is contained in:
Moritz Böhme 2022-10-16 13:55:42 +02:00
commit 7db3dd86f7
62 changed files with 1094 additions and 956 deletions

195
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1652712410, "lastModified": 1664140963,
"narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=", "narHash": "sha256-pFxDtOLduRFlol0Y4ShE+soRQX4kbhaCNBtDOvx7ykw=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b", "rev": "6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
"arkenfox-userjs": { "arkenfox-userjs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1659264624, "lastModified": 1662893183,
"narHash": "sha256-iONF1YbWlW99k71lIUA/hw5+Rv1kf5M3mCItW6JmjbI=", "narHash": "sha256-NyP/kJlV1Ai7os3gMqukKMdRSQ78GAjPCJkZDZtDdeo=",
"owner": "arkenfox", "owner": "arkenfox",
"repo": "user.js", "repo": "user.js",
"rev": "6e53e841f78c512f4d1eedb6a2409df746eea979", "rev": "3f09afdee07c5aea33f6dc4194e1425d6400a0d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -83,11 +83,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1656989878, "lastModified": 1663284638,
"narHash": "sha256-SvK+H9M62lhPvVRWfl7HGG0oRO90r1E8ju3PPp6A6N8=", "narHash": "sha256-rXAX14yB8v9BOG4ZsdGEedpZAnNqhQ4DtjQwzFX/TLY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "comma", "repo": "comma",
"rev": "f5732a6e8871348bafa3139a2f0d9bb7bc34c076", "rev": "c83ff3839983b3cb8deb407ff618ca12179de588",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -120,11 +120,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1660732240, "lastModified": 1664251341,
"narHash": "sha256-u3/pq8k7t9FHFEtArNinHs8ovY4hkFFuwB+zFX7FfIQ=", "narHash": "sha256-1f0KvK1VA8tGK7RVYZv17vSJ6URyt8fs81kRGfzPK3Q=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "8a8ab5655af3e7a741b8230a2c36453622ea330d", "rev": "550ce5667fee8f74aa20ad6456720ed84ebdd241",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -166,11 +166,11 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1659877975,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -194,14 +194,29 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"forgit-git": { "forgit-git": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1660668993, "lastModified": 1663431390,
"narHash": "sha256-TSF4Vr5uf/+MVU4yCdIHNnwB7kkp4mF+hkhKtLqQvmk=", "narHash": "sha256-dz7HNm9+dgb2ibomdrYdtSUC+ksrYdRR5RjBxSmc9eI=",
"owner": "wfxr", "owner": "wfxr",
"repo": "forgit", "repo": "forgit",
"rev": "3f50933f047510020428114551da0ee5cdfb32a3", "rev": "49579b2d1f620db6a71d070b40416c1af8a32168",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -218,11 +233,11 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1660574517, "lastModified": 1664273942,
"narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=", "narHash": "sha256-PFQR1UJQs7a7eaH5YoCZky5dmxR5cjaKRK+MpPbR7YE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861", "rev": "1f5ef2bb419a327fae28a83b50fab50959132c24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -231,13 +246,34 @@
"type": "github" "type": "github"
} }
}, },
"howdy": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"utils": "utils_3"
},
"locked": {
"lastModified": 1665340940,
"narHash": "sha256-6IIBGkD4spWRvMTEXRxWa31IerfVc1SSTruggY/lNR4=",
"ref": "refs/heads/main",
"rev": "17159cf269ce194703bc04671bb6d2378d124959",
"revCount": 3,
"type": "git",
"url": "https://git.sr.ht/~moritzboehme/howdy"
},
"original": {
"type": "git",
"url": "https://git.sr.ht/~moritzboehme/howdy"
}
},
"master": { "master": {
"locked": { "locked": {
"lastModified": 1660737173, "lastModified": 1664278750,
"narHash": "sha256-GIoZbN7ZWzQZu0NnnNgawIivtZlA8gER2gOrniZXyic=", "narHash": "sha256-frpTZQ+QMS7Xwi3fQSYdUTKd5e4YnrrDcS4WT+fdpfI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c085fe3e5ae411bcce050e61a84b418e38c8235b", "rev": "ff346a442d1e5ec81b24c312c06fd134bcc9c088",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -254,11 +290,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1653413650, "lastModified": 1662220400,
"narHash": "sha256-wojDHjb+eU80MPH+3HQaK0liUy8EgR95rvmCl24i58Y=", "narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "69daaceebe12c070cd5ae69ba38f277bbf033695", "rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -270,11 +306,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1660639432, "lastModified": 1665266435,
"narHash": "sha256-2WDiboOCfB0LhvnDVMXOAr8ZLDfm3WdO54CkoDPwN1A=", "narHash": "sha256-vLhkXxNzAIvJNLyjm6fGe9Rwy/lsE9dc5MgV7w1EtCs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6c6409e965a6c883677be7b9d87a95fab6c3472e", "rev": "8e8b0bd1fd99ac2bdca112f9e2431d7c80b1d655",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -285,6 +321,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1664235386,
"narHash": "sha256-hlkYFCJ9VKZPRW50vtpHHq4h1PJrptD5BbdLOEp4Lyc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ea4a87537cfdc83eebcd1804a5ec51057018784f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1645655918, "lastModified": 1645655918,
"narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=", "narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=",
@ -300,15 +352,40 @@
}, },
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": [
"nixpkgs": "nixpkgs_2" "howdy",
"flake-utils"
],
"nixpkgs": [
"howdy",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1659629599, "lastModified": 1664708386,
"narHash": "sha256-c9rvaqaH3HZo/C70E7rB18YSywa4ryTtN7CZ3cuCmoA=", "narHash": "sha256-aCD8UUGNYb5nYzRmtsq/0yP9gFOQQHr/Lsb5vW+mucw=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "6a9402e8f233de16536349d1dd3f4595c23386a4", "rev": "2e4a708918e14fdbd534cc94aaa9470cd19b2464",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks_2": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1663082609,
"narHash": "sha256-lmCCIu4dj59qbzkGKHQtolhpIEQMeAd2XUbXVPqgPYo=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "60cad1a326df17a8c6cf2bb23436609fdd83024e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -328,20 +405,21 @@
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"forgit-git": "forgit-git", "forgit-git": "forgit-git",
"home-manager": "home-manager", "home-manager": "home-manager",
"howdy": "howdy",
"master": "master", "master": "master",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks_2",
"stable": "stable", "stable": "stable",
"utils": "utils_3" "utils": "utils_4"
} }
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1660581366, "lastModified": 1664178928,
"narHash": "sha256-et+bi9/jlSF/pHx5AYB9ZP2XDdZEQ0vnF7xlvs4503Y=", "narHash": "sha256-+WVCZH/3Ifef4Da9N1tkGnmfX0QwtkJQz013QuImu10=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3d47bbaa26e7a771059d828eecf3bd8bf28a8b0f", "rev": "b542cc75fa03a3a29350d4c3b69739e946268a93",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -353,11 +431,11 @@
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1659877975,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -368,11 +446,11 @@
}, },
"utils_2": { "utils_2": {
"locked": { "locked": {
"lastModified": 1653893745, "lastModified": 1659877975,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -383,7 +461,28 @@
}, },
"utils_3": { "utils_3": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3" "flake-utils": [
"howdy",
"flake-utils"
]
},
"locked": {
"lastModified": 1657226504,
"narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
},
"utils_4": {
"inputs": {
"flake-utils": "flake-utils_4"
}, },
"locked": { "locked": {
"lastModified": 1657226504, "lastModified": 1657226504,

View file

@ -12,10 +12,7 @@
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
utils = { utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
url = "github:gytis-ivaskevicius/flake-utils-plus";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = { agenix = {
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
@ -65,14 +62,12 @@
url = "github:SenchoPens/base16.nix"; url = "github:SenchoPens/base16.nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
howdy.url = "git+https://git.sr.ht/~moritzboehme/howdy";
}; };
outputs = outputs =
inputs @ { self inputs@{ self, nixpkgs, utils, ... }:
, nixpkgs
, utils
, ...
}:
utils.lib.mkFlake { utils.lib.mkFlake {
inherit self inputs; inherit self inputs;
@ -87,6 +82,7 @@
self.overlays.default self.overlays.default
inputs.utils.overlay inputs.utils.overlay
inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
inputs.howdy.overlays.default
]; ];
############### ###############
@ -99,6 +95,7 @@
./modules/profiles/desktop.nix ./modules/profiles/desktop.nix
./modules/profiles/work.nix ./modules/profiles/work.nix
]; ];
hostDefaults.modules = [ hostDefaults.modules = [
./modules/default.nix ./modules/default.nix
self.nixosModules.base self.nixosModules.base
@ -112,12 +109,14 @@
} }
inputs.agenix.nixosModules.age inputs.agenix.nixosModules.age
inputs.base16.nixosModule inputs.base16.nixosModule
inputs.howdy.nixosModules.default
]; ];
hosts.nixos-laptop.modules = [ hosts.nixos-laptop.modules = [
./hosts/nixos-laptop ./hosts/nixos-laptop
self.nixosModules.desktop self.nixosModules.desktop
]; ];
hosts.nixos-desktop.modules = [ hosts.nixos-desktop.modules = [
./hosts/nixos-desktop ./hosts/nixos-desktop
self.nixosModules.desktop self.nixosModules.desktop
@ -145,6 +144,7 @@
cachix cachix
]; ];
}; };
checks.pre-commit-check = inputs.pre-commit-hooks.lib."${system}".run { checks.pre-commit-check = inputs.pre-commit-hooks.lib."${system}".run {
src = ./.; src = ./.;
hooks = { hooks = {

View file

@ -14,12 +14,6 @@
# KERNEL # KERNEL
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
# MY MODULES
my.email = {
enable = true;
passwordFile = ../../secrets/email-desktop.age;
};
# BOOT # BOOT
boot = { boot = {
supportedFilesystems = [ "btrfs" "ntfs" ]; supportedFilesystems = [ "btrfs" "ntfs" ];

View file

@ -17,7 +17,7 @@
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" ]; options = [ "subvol=root" "compress=zstd" ];
}; };
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd"; boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd";
@ -25,25 +25,19 @@
fileSystems."/home" = { fileSystems."/home" = {
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" ]; options = [ "subvol=home" "compress=zstd" ];
}; };
fileSystems."/nix" = { fileSystems."/nix" = {
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" ]; options = [ "subvol=nix" "compress=zstd" ];
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";
fsType = "btrfs";
options = [ "subvol=persist" ];
}; };
fileSystems."/var/log" = { fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=log" ]; options = [ "subvol=log" "compress=zstd" ];
neededForBoot = true; neededForBoot = true;
}; };

View file

@ -11,10 +11,9 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# MY MODULES services.howdy = {
my.email = {
enable = true; enable = true;
passwordFile = ../../secrets/email-desktop.age; certainty = 3.0;
}; };
# BOOT # BOOT

View file

@ -17,7 +17,7 @@
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=root" ]; options = [ "subvol=root" "compress=zstd" ];
}; };
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/078b81ba-238e-471d-9951-b743588532b8"; boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/078b81ba-238e-471d-9951-b743588532b8";
@ -25,14 +25,14 @@
fileSystems."/log" = { fileSystems."/log" = {
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=log" ]; options = [ "subvol=log" "compress=zstd" ];
neededForBoot = true; neededForBoot = true;
}; };
fileSystems."/nix" = { fileSystems."/nix" = {
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" ]; options = [ "subvol=nix" "compress=zstd" ];
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
@ -43,13 +43,13 @@
fileSystems."/persist" = { fileSystems."/persist" = {
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=persist" ]; options = [ "subvol=persist" "compress=zstd" ];
}; };
fileSystems."/home" = { fileSystems."/home" = {
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154"; device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=home" ]; options = [ "subvol=home" "compress=zstd" ];
}; };
swapDevices = [{ device = "/dev/disk/by-uuid/29ebf65f-e6ca-4625-9f72-a9321152be1b"; }]; swapDevices = [{ device = "/dev/disk/by-uuid/29ebf65f-e6ca-4625-9f72-a9321152be1b"; }];

View file

@ -14,13 +14,7 @@ let
sxhkdHelp = import ./sxhkdHelp.nix { inherit pkgs; }; sxhkdHelp = import ./sxhkdHelp.nix { inherit pkgs; };
in in
{ {
options.my.bin = { options.my.bin.enable = mkEnableOption "bin";
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -7,7 +7,6 @@
{ {
imports = [ imports = [
./bin ./bin
./email.nix
./nix.nix ./nix.nix
./shell.nix ./shell.nix
./theming ./theming

View file

@ -1,50 +0,0 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.email;
name = "Moritz Böhme";
email = "mail@moritzboeh.me";
mailDirectory = "/home/moritz/.mail";
in
{
options.my.email = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
passwordFile = mkOption {
default = null;
type = types.path;
description = "File containing the email password.";
};
};
config = mkIf cfg.enable {
# Protonbridge Setup
environment.systemPackages = with pkgs; [ protonmail-bridge ];
systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge";
enable = true;
script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug";
path = [
pkgs.gnome3.gnome-keyring
]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
};
age.secrets.email = {
file = cfg.passwordFile;
owner = "1000";
};
# Email Applications
home-manager.users.moritz.home.packages = with pkgs; [ thunderbird ];
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
};
}

View file

@ -1,6 +1,7 @@
{ config { config
, lib , lib
, pkgs , pkgs
, inputs
, ... , ...
}: }:
@ -10,22 +11,21 @@ let
in in
{ {
options.my.nix = { options.my.nix = {
gc.enable = mkOption { gc = {
default = true; enable = mkEnableOption "nix-gc";
type = types.bool; minimumFreedGB = mkOption {
example = false; default = 32;
}; type = types.int;
optimise.enable = mkOption { apply = number: toString (number * 1024 * 1024 * 1024);
default = true; };
type = types.bool;
example = false;
}; };
optimise.enable = mkEnableOption "nix-optimise";
}; };
config.nix = { config.nix = {
gc = { gc = {
automatic = cfg.gc.enable; automatic = cfg.gc.enable;
options = "--max-freed $((32 * 1024**3)) --delete-older-than 14d"; options = "--max-freed ${cfg.gc.minimumFreedGB} --delete-older-than 14d";
dates = "weekly"; dates = "weekly";
}; };
@ -34,6 +34,17 @@ in
dates = [ "weekly" ]; dates = [ "weekly" ];
}; };
registry = {
master-upstream.to = {
type = "github";
owner = "nixos";
repo = "nixpkgs";
};
master.flake = inputs.master;
nixpkgs.flake = inputs.nixpkgs;
stable.flake = inputs.stable;
};
settings = { settings = {
substituters = [ substituters = [
"https://cache.nixos.org/" "https://cache.nixos.org/"

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-frappe")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "f2d5cf";
flamingo = "eebebe";
pink = "f4b8e4";
mauve = "ca9ee6";
red = "e78284";
maroon = "ea999c";
peach = "ef9f76";
yellow = "e5c890";
green = "a6d189";
teal = "81c8be";
sky = "99d1db";
sapphire = "85c1dc";
blue = "8caaee";
lavender = "babbf1";
text = "c6d0f5";
subtext1 = "b5bfe2";
subtext0 = "a5adce";
overlay2 = "949cbb";
overlay1 = "838ba7";
overlay0 = "737994";
surface2 = "626880";
surface1 = "51576d";
surface0 = "414559";
base = "303446";
mantle = "292c3c";
crust = "232634";
});
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-latte")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "dc8a78";
flamingo = "dd7878";
pink = "ea76cb";
mauve = "8839ef";
red = "d20f39";
maroon = "e64553";
peach = "fe640b";
yellow = "df8e1d";
green = "40a02b";
teal = "179299";
sky = "04a5e5";
sapphire = "209fb5";
blue = "1e66f5";
lavender = "7287fd";
text = "4c4f69";
subtext1 = "5c5f77";
subtext0 = "6c6f85";
overlay2 = "7c7f93";
overlay1 = "8c8fa1";
overlay0 = "9ca0b0";
surface2 = "acb0be";
surface1 = "bcc0cc";
surface0 = "ccd0da";
base = "eff1f5";
mantle = "e6e9ef";
crust = "dce0e8";
});
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-macchiato")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "f4dbd6";
flamingo = "f0c6c6";
pink = "f5bde6";
mauve = "c6a0f6";
red = "ed8796";
maroon = "ee99a0";
peach = "f5a97f";
yellow = "eed49f";
green = "a6da95";
teal = "8bd5ca";
sky = "91d7e3";
sapphire = "7dc4e4";
blue = "8aadf4";
lavender = "b7bdf8";
text = "cad3f5";
subtext1 = "b8c0e0";
subtext0 = "a5adcb";
overlay2 = "939ab7";
overlay1 = "8087a2";
overlay0 = "6e738d";
surface2 = "5b6078";
surface1 = "494d64";
surface0 = "363a4f";
base = "24273a";
mantle = "1e2030";
crust = "181926";
});
}

View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.my.theming;
in
{
config = mkIf (cfg.scheme == "catppuccin-mocha")
(import ./catppuccin.nix
{
inherit config lib pkgs;
rosewater = "f5e0dc";
flamingo = "f2cdcd";
pink = "f5c2e7";
mauve = "cba6f7";
red = "f38ba8";
maroon = "eba0ac";
peach = "fab387";
yellow = "f9e2af";
green = "a6e3a1";
teal = "94e2d5";
sky = "89dceb";
sapphire = "74c7ec";
blue = "89b4fa";
lavender = "b4befe";
text = "cdd6f4";
subtext1 = "bac2de";
subtext0 = "a6adc8";
overlay2 = "9399b2";
overlay1 = "7f849c";
overlay0 = "6c7086";
surface2 = "585b70";
surface1 = "45475a";
surface0 = "494d64";
base = "1e1e2e";
mantle = "181825";
crust = "11111b";
});
}

View file

@ -1,272 +1,326 @@
{ config, lib, pkgs, ... }: { config
, lib
, pkgs
, rosewater
, flamingo
, pink
, mauve
, red
, maroon
, peach
, yellow
, green
, teal
, sky
, sapphire
, blue
, lavender
, text
, subtext1
, subtext0
, overlay2
, overlay1
, overlay0
, surface2
, surface1
, surface0
, base
, mantle
, crust
}:
with lib; with lib;
let let
cfg = config.my.theming; cfg = config.my.theming;
rosewater = "#f2d5cf";
flamingo = "#eebebe";
pink = "#f4b8e4";
mauve = "#ca9ee6";
red = "#e78284";
maroon = "#ea999c";
peach = "#ef9f76";
yellow = "#e5c890";
green = "#a6d189";
teal = "#81c8be";
sky = "#99d1db";
sapphire = "#85c1dc";
blue = "#8caaee";
lavender = "#babbf1";
text = "#c6d0f5";
subtext1 = "#b5bfe2";
subtext0 = "#a5adce";
overlay2 = "#949cbb";
overlay1 = "#838ba7";
overlay0 = "#737994";
surface2 = "#626880";
surface1 = "#51576d";
surface0 = "#414559";
base = "#303446";
mantle = "#292c3c";
crust = "#232634";
in in
{ {
config = mkIf (cfg.scheme == "catppuccin") { home-manager.users.moritz = {
home-manager.users.moritz = { programs = {
programs = { kitty.extraConfig = ''
kitty.extraConfig = # vim:ft=kitty
''
# vim:ft=kitty
## name: Catppuccin-Frappe ## name: Catppuccin-Frappe
## author: Pocco81 (https://github.com/Pocco81) ## author: Pocco81 (https://github.com/Pocco81)
## license: MIT ## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/frappe.conf ## upstream: https://github.com/catppuccin/kitty/blob/main/frappe.conf
## blurb: Soothing pastel theme for the high-spirited! ## blurb: Soothing pastel theme for the high-spirited!
# The basic colors # The basic colors
foreground #C6D0F5 foreground #${text}
background #303446 background #${base}
selection_foreground #303446 selection_foreground #${base}
selection_background ${rosewater} selection_background #${rosewater}
# Cursor colors # Cursor colors
cursor ${rosewater} cursor #${rosewater}
cursor_text_color #303446 cursor_text_color #${base}
# URL underline color when hovering with mouse # URL underline color when hovering with mouse
url_color ${rosewater} url_color #${rosewater}
# Kitty window border colors # Kitty window border colors
active_border_color #BABBF1 active_border_color #${lavender}
inactive_border_color #737994 inactive_border_color #${overlay0}
bell_border_color #E5C890 bell_border_color #${yellow}
# OS Window titlebar colors # OS Window titlebar colors
wayland_titlebar_color system wayland_titlebar_color system
macos_titlebar_color system macos_titlebar_color system
# Tab bar colors # Tab bar colors
active_tab_foreground #232634 active_tab_foreground #${crust}
active_tab_background ${mauve} active_tab_background #${mauve}
inactive_tab_foreground #C6D0F5 inactive_tab_foreground #${text}
inactive_tab_background #292C3C inactive_tab_background #${mantle}
tab_bar_background #232634 tab_bar_background #${crust}
# Colors for marks (marked text in the terminal) # Colors for marks (marked text in the terminal)
mark1_foreground #303446 mark1_foreground #${base}
mark1_background #BABBF1 mark1_background #${lavender}
mark2_foreground #303446 mark2_foreground #${base}
mark2_background ${mauve} mark2_background #${mauve}
mark3_foreground #303446 mark3_foreground #${base}
mark3_background #85C1DC mark3_background #${sapphire}
# The 16 terminal colors # The 16 terminal colors
# black # black
color0 #51576D color0 #${surface1}
color8 #626880 color8 #${surface2}
# red # red
color1 ${red} color1 #${red}
color9 ${red} color9 #${red}
# green # green
color2 #A6D189 color2 #${green}
color10 #A6D189 color10 #${green}
# yellow # yellow
color3 #E5C890 color3 #${yellow}
color11 #E5C890 color11 #${yellow}
# blue # blue
color4 #8CAAEE color4 #${blue}
color12 #8CAAEE color12 #${blue}
# magenta # magenta
color5 ${pink} color5 #${pink}
color13 ${pink} color13 #${pink}
# cyan # cyan
color6 #81C8BE color6 #${teal}
color14 #81C8BE color14 #${teal}
# white # white
color7 #B5BFE2 color7 #${subtext1}
color15 #A5ADCE color15 #${subtext0}
''; '';
zathura.extraConfig = '' zathura.extraConfig = ''
set window-title-basename "true" set window-title-basename "true"
set selection-clipboard "clipboard" set selection-clipboard "clipboard"
set default-fg "#C6D0F5" set default-fg "#${text}"
set default-bg "#303446" set default-bg "#${base}"
set completion-bg "#414559" set completion-bg "#${surface0}"
set completion-fg "#C6D0F5" set completion-fg "#${text}"
set completion-highlight-bg "#575268" set completion-highlight-bg "#575268"
set completion-highlight-fg "#C6D0F5" set completion-highlight-fg "#${text}"
set completion-group-bg "#414559" set completion-group-bg "#${surface0}"
set completion-group-fg "#8CAAEE" set completion-group-fg "#${blue}"
set statusbar-fg "#C6D0F5" set statusbar-fg "#${text}"
set statusbar-bg "#414559" set statusbar-bg "#${surface0}"
set notification-bg "#414559" set notification-bg "#${surface0}"
set notification-fg "#C6D0F5" set notification-fg "#${text}"
set notification-error-bg "#414559" set notification-error-bg "#${surface0}"
set notification-error-fg "${red}" set notification-error-fg "#${red}"
set notification-warning-bg "#414559" set notification-warning-bg "#${surface0}"
set notification-warning-fg "#FAE3B0" set notification-warning-fg "#FAE3B0"
set inputbar-fg "#C6D0F5" set inputbar-fg "#${text}"
set inputbar-bg "#414559" set inputbar-bg "#${surface0}"
set recolor-lightcolor "#303446" set recolor-lightcolor "#${base}"
set recolor-darkcolor "#C6D0F5" set recolor-darkcolor "#${text}"
set index-fg "#C6D0F5" set index-fg "#${text}"
set index-bg "#303446" set index-bg "#${base}"
set index-active-fg "#C6D0F5" set index-active-fg "#${text}"
set index-active-bg "#414559" set index-active-bg "#${surface0}"
set render-loading-bg "#303446" set render-loading-bg "#${base}"
set render-loading-fg "#C6D0F5" set render-loading-fg "#${text}"
set highlight-color "#575268" set highlight-color "#575268"
set highlight-fg "${pink}" set highlight-fg "#${pink}"
set highlight-active-color "${pink}" set highlight-active-color "#${pink}"
''; '';
rofi = { rofi = {
theme = "custom"; theme = "custom";
extraConfig = { extraConfig = {
show-icons = true; show-icons = true;
terminal = "alacritty"; terminal = "alacritty";
drun-display-format = "{icon} {name}"; drun-display-format = "{icon} {name}";
location = 0; location = 0;
disable-history = false; disable-history = false;
hide-scrollbar = true; hide-scrollbar = true;
display-drun = " Apps "; display-drun = " Apps ";
display-run = " Run "; display-run = " Run ";
display-window = " Window"; display-window = " Window";
display-Network = " 󰤨 Network"; display-Network = " 󰤨 Network";
sidebar-mode = true; sidebar-mode = true;
};
};
};
xsession.windowManager.bspwm.settings = {
focused_border_color = "#${mauve}";
normal_border_color = "#${base}";
active_border_color = "#${base}";
};
services = {
dunst.settings = {
global = {
# Defines color of the frame around the notification window.
frame_color = "#${blue}";
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
};
urgency_low = {
background = "#${base}";
foreground = "#${text}";
};
urgency_normal = {
background = "#${base}";
foreground = "#${text}";
};
urgency_critical = {
background = "#${base}";
foreground = "#${text}";
frame_color = "#${peach}";
};
};
polybar = {
config = {
"bar/bottom" = {
background = base;
foreground = text;
border-color = base;
};
"module/bspwm" = {
label-focused-foreground = pink;
label-occupied-foreground = overlay1;
label-urgent-foreground = maroon;
label-empty-foreground = overlay1;
label-separator-foreground = base;
};
"module/cpu" = {
format-foreground = base;
format-background = green;
};
"module/time" = {
format-foreground = base;
format-background = blue;
};
"module/date" = {
format-foreground = base;
format-background = peach;
};
"module/memory" = {
format-foreground = base;
format-background = blue;
};
"module/pulseaudio" = {
format-volume-foreground = base;
format-volume-background = mauve;
label-muted = " muted";
format-muted-foreground = base;
format-muted-background = red;
};
"module/network" = {
format-connected-foreground = base;
format-connected-background = mauve;
};
"module/battery" = {
format-charging-foreground = base;
format-charging-background = green;
format-full-foreground = base;
format-full-background = green;
format-discharging-foreground = base;
format-discharging-background = red;
}; };
}; };
}; };
xsession.windowManager.bspwm = { };
settings = { xdg.configFile = {
focused_border_color = mauve; "fish/conf.d/theme.fish".text = ''
normal_border_color = base; # Catppuccin color palette
active_border_color = base;
};
};
services = {
dunst.settings = {
global = {
# Defines color of the frame around the notification window.
frame_color = blue;
# Define a color for the separator. # --> special
# possible values are: set -l foreground ${text}
# * auto: dunst tries to find a color fitting to the background; set -l selection ${surface0}
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
};
urgency_low = { # --> palette
background = base; set -l teal ${teal}
foreground = text; set -l flamingo ${flamingo}
}; set -l mauve ${mauve}
urgency_normal = { set -l pink ${pink}
background = base; set -l red ${red}
foreground = text; set -l peach ${peach}
}; set -l green ${green}
urgency_critical = { set -l yellow ${yellow}
background = base; set -l blue ${blue}
foreground = text; set -l gray ${overlay0}
frame_color = peach;
}; # Syntax Highlighting
}; set -g fish_color_normal $foreground
polybar = { set -g fish_color_command $blue
config = { set -g fish_color_param $flamingo
"bar/bottom" = { set -g fish_color_keyword $red
background = base; set -g fish_color_quote $green
foreground = text; set -g fish_color_redirection $pink
border-color = base; set -g fish_color_end $peach
}; set -g fish_color_error $red
"module/bspwm" = { set -g fish_color_gray $gray
label-focused-foreground = pink; set -g fish_color_selection --background=$selection
label-occupied-foreground = overlay1; set -g fish_color_search_match --background=$selection
label-urgent-foreground = maroon; set -g fish_color_operator $pink
label-empty-foreground = overlay1; set -g fish_color_escape $flamingo
label-separator-foreground = base; set -g fish_color_autosuggestion $gray
}; set -g fish_color_cancel $red
"module/cpu" = {
format-foreground = base; # Prompt
format-background = green; set -g fish_color_cwd $yellow
}; set -g fish_color_user $teal
"module/time" = { set -g fish_color_host $blue
format-foreground = base;
format-background = blue; # Completion Pager
}; set -g fish_pager_color_progress $gray
"module/date" = { set -g fish_pager_color_prefix $pink
format-foreground = base; set -g fish_pager_color_completion $foreground
format-background = peach; set -g fish_pager_color_description $gray
}; '';
"module/memory" = { "rofi/custom.rasi".text = ''
format-foreground = base;
format-background = blue;
};
"module/pulseaudio" = {
format-volume-foreground = base;
format-volume-background = mauve;
label-muted = "%{F${red}} %{F${base}}muted";
format-muted-foreground = base;
format-muted-background = red;
};
"module/network" = {
format-connected-foreground = base;
format-connected-background = mauve;
};
};
};
};
xdg.configFile."rofi/custom.rasi".text = ''
* { * {
bg-col: #303446; bg-col: #${base};
bg-col-light: #303446; bg-col-light: #${base};
border-col: #303446; border-col: #${base};
selected-col: #303446; selected-col: #${base};
blue: #8caaee; blue: #${blue};
fg-col: #c6d0f5; fg-col: #${text};
fg-col2: ${red}; fg-col2: #${red};
grey: #737994; grey: #${overlay0};
width: 900; width: 900;
font: "JetBrainsMono Nerd Font 14"; font: "JetBrainsMono Nerd Font 14";

View file

@ -10,17 +10,25 @@ let
cfg = config.my.theming; cfg = config.my.theming;
in in
{ {
imports = [ ./dracula.nix ./catppuccin.nix ]; imports = [
./dracula.nix
./catppuccin-frappe.nix
./catppuccin-latte.nix
./catppuccin-macchiato.nix
./catppuccin-mocha.nix
];
options.my.theming = { options.my.theming = {
enable = mkOption { enable = mkEnableOption "theming";
default = false;
type = types.bool;
example = true;
};
scheme = mkOption { scheme = mkOption {
default = "catppuccin"; default = "catppuccin-macchiato";
type = types.enum [ "dracula" "catppuccin" ]; type = types.enum [
"dracula"
"catppuccin-latte"
"catppuccin-frappe"
"catppuccin-macchiato"
"catppuccin-mocha"
];
}; };
}; };
@ -62,8 +70,11 @@ in
time-format = "%H:%M"; time-format = "%H:%M";
format-charging = "<animation-charging> <label-charging>"; format-charging = "<animation-charging> <label-charging>";
format-charging-padding = 1;
format-discharging = "<animation-discharging> <label-discharging>"; format-discharging = "<animation-discharging> <label-discharging>";
format-discharging-padding = 1;
format-full = " <label-full>"; format-full = " <label-full>";
format-full-padding = 1;
label-charging = "%percentage%% %time% remaining"; label-charging = "%percentage%% %time% remaining";
label-discharging = "%percentage%% %time% remaining"; label-discharging = "%percentage%% %time% remaining";

View file

@ -149,16 +149,18 @@ in
}; };
services = { services = {
dunst.settings = { dunst.settings = {
# Defines color of the frame around the notification window. global = {
frame_color = "#282a36"; # Defines color of the frame around the notification window.
frame_color = "#282a36";
# Define a color for the separator. # Define a color for the separator.
# possible values are: # possible values are:
# * auto: dunst tries to find a color fitting to the background; # * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground; # * foreground: use the same color as the foreground;
# * frame: use the same color as the frame; # * frame: use the same color as the frame;
# * anything else will be interpreted as a X color. # * anything else will be interpreted as a X color.
separator_color = "frame"; separator_color = "frame";
};
urgency_low = { urgency_low = {
background = "#282a36"; background = "#282a36";
@ -219,148 +221,202 @@ in
}; };
}; };
}; };
xdg.configFile."rofi/dracula.rasi".text = '' xdg.configFile = {
* { "fish/conf.d/theme.fish".text = ''
/* Dracula theme colour palette */ # Dracula Color Palette
drac-bgd: #282a36; set -l foreground f8f8f2
drac-cur: #44475a; set -l selection 44475a
drac-fgd: #f8f8f2; set -l comment 6272a4
drac-cmt: #6272a4; set -l red ff5555
drac-cya: #8be9fd; set -l orange ffb86c
drac-grn: #50fa7b; set -l yellow f1fa8c
drac-ora: #ffb86c; set -l green 50fa7b
drac-pnk: #ff79c6; set -l purple bd93f9
drac-pur: #bd93f9; set -l cyan 8be9fd
drac-red: #ff5555; set -l pink ff79c6
drac-yel: #f1fa8c;
font: "FiraCode Nerd Font Mono 13"; # Syntax Highlighting Colors
set -gx fish_color_normal $foreground
set -gx fish_color_command $cyan
set -gx fish_color_keyword $pink
set -gx fish_color_quote $yellow
set -gx fish_color_redirection $foreground
set -gx fish_color_end $orange
set -gx fish_color_error $red
set -gx fish_color_param $purple
set -gx fish_color_comment $comment
set -gx fish_color_selection --background=$selection
set -gx fish_color_search_match --background=$selection
set -gx fish_color_operator $green
set -gx fish_color_escape $pink
set -gx fish_color_autosuggestion $comment
set -gx fish_color_cancel $red --reverse
set -gx fish_color_option $orange
foreground: @drac-fgd; # Default Prompt Colors
background-color: @drac-bgd; set -gx fish_color_cwd $green
active-background: @drac-pnk; set -gx fish_color_host $purple
urgent-foreground: @foreground; set -gx fish_color_host_remote $purple
urgent-background: @drac-red; set -gx fish_color_user $cyan
selected-background: @active-background; # Completion Pager Colors
selected-urgent-background: @urgent-background; set -gx fish_pager_color_progress $comment
selected-active-background: @active-background; set -gx fish_pager_color_background
separatorcolor: @active-background; set -gx fish_pager_color_prefix $cyan
bordercolor: #6272a4; set -gx fish_pager_color_completion $foreground
} set -gx fish_pager_color_description $comment
set -gx fish_pager_color_selected_background --background=$selection
set -gx fish_pager_color_selected_prefix $cyan
set -gx fish_pager_color_selected_completion $foreground
set -gx fish_pager_color_selected_description $comment
set -gx fish_pager_color_secondary_background
set -gx fish_pager_color_secondary_prefix $cyan
set -gx fish_pager_color_secondary_completion $foreground
set -gx fish_pager_color_secondary_description $comment
'';
"rofi/dracula.rasi".text = ''
* {
/* Dracula theme colour palette */
drac-bgd: #282a36;
drac-cur: #44475a;
drac-fgd: #f8f8f2;
drac-cmt: #6272a4;
drac-cya: #8be9fd;
drac-grn: #50fa7b;
drac-ora: #ffb86c;
drac-pnk: #ff79c6;
drac-pur: #bd93f9;
drac-red: #ff5555;
drac-yel: #f1fa8c;
#window { font: "FiraCode Nerd Font Mono 13";
background-color: @background-color;
border: 3; foreground: @drac-fgd;
border-radius: 6; background-color: @drac-bgd;
border-color: @bordercolor; active-background: @drac-pnk;
padding: 5; urgent-foreground: @foreground;
} urgent-background: @drac-red;
#mainbox {
border: 0; selected-background: @active-background;
padding: 5; selected-urgent-background: @urgent-background;
} selected-active-background: @active-background;
#message { separatorcolor: @active-background;
border: 1px dash 0px 0px ; bordercolor: #6272a4;
border-color: @separatorcolor; }
padding: 1px ;
} #window {
#textbox { background-color: @background-color;
text-color: @foreground; border: 3;
} border-radius: 6;
#listview { border-color: @bordercolor;
fixed-height: 0; padding: 5;
border: 2px dash 0px 0px ; }
border-color: @bordercolor; #mainbox {
spacing: 2px ; border: 0;
scrollbar: false; padding: 5;
padding: 2px 0px 0px ; }
} #message {
#element { border: 1px dash 0px 0px ;
border: 0; border-color: @separatorcolor;
padding: 1px ; padding: 1px ;
} }
#element.normal.normal { #textbox {
background-color: @background-color; text-color: @foreground;
text-color: @foreground; }
} #listview {
#element.normal.urgent { fixed-height: 0;
background-color: @urgent-background; border: 2px dash 0px 0px ;
text-color: @urgent-foreground; border-color: @bordercolor;
} spacing: 2px ;
#element.normal.active { scrollbar: false;
background-color: @active-background; padding: 2px 0px 0px ;
text-color: @background-color; }
} #element {
#element.selected.normal { border: 0;
background-color: @selected-background; padding: 1px ;
text-color: @foreground; }
} #element.normal.normal {
#element.selected.urgent { background-color: @background-color;
background-color: @selected-urgent-background; text-color: @foreground;
text-color: @foreground; }
} #element.normal.urgent {
#element.selected.active { background-color: @urgent-background;
background-color: @selected-active-background; text-color: @urgent-foreground;
text-color: @background-color; }
} #element.normal.active {
#element.alternate.normal { background-color: @active-background;
background-color: @background-color; text-color: @background-color;
text-color: @foreground; }
} #element.selected.normal {
#element.alternate.urgent { background-color: @selected-background;
background-color: @urgent-background; text-color: @foreground;
text-color: @foreground; }
} #element.selected.urgent {
#element.alternate.active { background-color: @selected-urgent-background;
background-color: @active-background; text-color: @foreground;
text-color: @foreground; }
} #element.selected.active {
#scrollbar { background-color: @selected-active-background;
width: 2px ; text-color: @background-color;
border: 0; }
handle-width: 8px ; #element.alternate.normal {
padding: 0; background-color: @background-color;
} text-color: @foreground;
#sidebar { }
border: 2px dash 0px 0px ; #element.alternate.urgent {
border-color: @separatorcolor; background-color: @urgent-background;
} text-color: @foreground;
#button.selected { }
background-color: @selected-background; #element.alternate.active {
text-color: @foreground; background-color: @active-background;
} text-color: @foreground;
#inputbar { }
spacing: 0; #scrollbar {
text-color: @foreground; width: 2px ;
padding: 1px ; border: 0;
} handle-width: 8px ;
#case-indicator { padding: 0;
spacing: 0; }
text-color: @foreground; #sidebar {
} border: 2px dash 0px 0px ;
#entry { border-color: @separatorcolor;
spacing: 0; }
text-color: @drac-cya; #button.selected {
} background-color: @selected-background;
#prompt { text-color: @foreground;
spacing: 0; }
text-color: @drac-grn; #inputbar {
} spacing: 0;
#inputbar { text-color: @foreground;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; padding: 1px ;
} }
#textbox-prompt-colon { #case-indicator {
expand: false; spacing: 0;
str: ":"; text-color: @foreground;
margin: 0px 0.3em 0em 0em ; }
text-color: @drac-grn; #entry {
} spacing: 0;
element-text, element-icon { text-color: @drac-cya;
background-color: inherit; }
text-color: inherit; #prompt {
} spacing: 0;
''; text-color: @drac-grn;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @drac-grn;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
'';
};
}; };
}; };
} }

View file

@ -9,13 +9,7 @@ let
cfg = config.my.wallpapers; cfg = config.my.wallpapers;
in in
{ {
options.my.wallpapers = { options.my.wallpapers.enable = mkEnableOption "wallpapers";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.xdg = { home-manager.users.moritz.xdg = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.yubikey; cfg = config.my.yubikey;
in in
{ {
options.my.yubikey = { options.my.yubikey = mkEnableOption "yubikey";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = { config = {
services.udev.packages = [ pkgs.yubikey-personalization ]; services.udev.packages = [ pkgs.yubikey-personalization ];

View file

@ -9,7 +9,7 @@ with lib;
users.users.moritz = { users.users.moritz = {
isNormalUser = true; isNormalUser = true;
home = "/home/moritz"; home = "/home/moritz";
extraGroups = [ "wheel" ]; # "networkmanager" "video" "dialout" extraGroups = [ "wheel" "networkmanager" "video" ];
initialPassword = "password"; # CHANGE ME PLEASE initialPassword = "password"; # CHANGE ME PLEASE
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
@ -22,10 +22,15 @@ with lib;
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
my = { my = {
nix = {
gc.enable = true;
optimise.enable = true;
};
bin.enable = true;
shell = { shell = {
abbreviations = { abbreviations = {
us = "systemctl --user"; us = "systemctl --user";
rs = "doas systemctl"; rs = "sudo systemctl";
}; };
aliases = { aliases = {
ls = "exa -lh --icons --git"; ls = "exa -lh --icons --git";
@ -34,8 +39,8 @@ with lib;
rm = "rm -i"; rm = "rm -i";
mv = "mv -i"; mv = "mv -i";
nix-switch = "doas nixos-rebuild switch --flake ~/.dotfiles"; nix-switch = "sudo nixos-rebuild switch --flake ~/.dotfiles";
nix-boot = "doas nixos-rebuild boot --flake ~/.dotfiles"; nix-boot = "sudo nixos-rebuild boot --flake ~/.dotfiles";
nix-lock = "pushd ~/.dotfiles && nix flake update && popd"; nix-lock = "pushd ~/.dotfiles && nix flake update && popd";
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent''; latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
@ -43,9 +48,13 @@ with lib;
variables = { EDITOR = "vim"; }; variables = { EDITOR = "vim"; };
}; };
programs = { programs = {
vim.enable = true; direnv.enable = true;
fish.enable = true;
git.enable = true;
gpg.enable = true;
helix.enable = true; helix.enable = true;
kakoune.enable = true; kakoune.enable = true;
vim.enable = true;
}; };
}; };
@ -81,14 +90,14 @@ with lib;
entr entr
exa exa
gparted gparted
hub hut
lazygit
neofetch neofetch
tmux tmux
ttyper ttyper
up up
viu viu
wget wget
hut
]; ];
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
@ -110,6 +119,12 @@ with lib;
(builtins.attrValues config.fileSystems)); (builtins.attrValues config.fileSystems));
}; };
i18n.extraLocaleSettings = {
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
home-manager.users.moritz = { home-manager.users.moritz = {
programs = { programs = {
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
@ -120,12 +135,6 @@ with lib;
home = { home = {
username = "moritz"; username = "moritz";
homeDirectory = "/home/moritz"; homeDirectory = "/home/moritz";
language = {
base = "en_US.UTF-8";
time = "de_DE.UTF-8";
numeric = "de_DE.UTF-8";
paper = "de_DE.UTF-8";
};
stateVersion = "21.05"; stateVersion = "21.05";
}; };
xdg.userDirs.enable = true; xdg.userDirs.enable = true;

View file

@ -78,16 +78,17 @@ with lib; {
hub.enable = true; hub.enable = true;
kitty.enable = true; kitty.enable = true;
ledger.enable = true; ledger.enable = true;
logseq.enable = true;
python.enable = true; python.enable = true;
rofi.enable = true; rofi.enable = true;
spotify.enable = true; spotify.enable = true;
thunar.enable = true; thunar.enable = true;
zathura.enable = true; zathura.enable = true;
}; };
services = { services = {
dunst.enable = true; dunst.enable = true;
kdeconnect.enable = true; kdeconnect.enable = true;
mullvad.enable = true;
openconnect.enable = true; openconnect.enable = true;
openvpn.enable = true; openvpn.enable = true;
picom.enable = true; picom.enable = true;
@ -96,6 +97,8 @@ with lib; {
}; };
}; };
programs.xss-lock.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# nix # nix
nixpkgs-review nixpkgs-review
@ -111,11 +114,11 @@ with lib; {
jellyfin-media-player jellyfin-media-player
keepassxc keepassxc
libreoffice libreoffice
logseq
pavucontrol pavucontrol
signal-desktop signal-desktop
tlaplusToolbox tlaplusToolbox
vlc vlc
thunderbird
]; ];
home-manager.users.moritz = { home-manager.users.moritz = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.adb; cfg = config.my.programs.adb;
in in
{ {
options.my.programs.adb = { options.my.programs.adb.enable = mkEnableOption "adb";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.adb.enable = true; programs.adb.enable = true;

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.bspwm; cfg = config.my.programs.bspwm;
in in
{ {
options.my.programs.bspwm = { options.my.programs.bspwm.enable = mkEnableOption "true";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services = { services = {
@ -51,7 +45,6 @@ in
focus_follows_pointer = true; focus_follows_pointer = true;
}; };
startupPrograms = [ startupPrograms = [
"${pkgs.systemd}/bin/systemctl --user start polybar.service"
"randomWallpaper" "randomWallpaper"
"${pkgs.synology-drive-client}/bin/synology-drive" "${pkgs.synology-drive-client}/bin/synology-drive"
]; ];
@ -72,16 +65,24 @@ in
''; '';
}; };
}; };
systemd.user.targets.tray = {
home.packages = with pkgs; [ Unit = {
bc # HACK to get bsp-layout to work Description = "Bspwm Tray Target";
brightnessctl After = [ "graphical-session.target" ];
bsp-layout };
feh Install = {
pamixer WantedBy = [ "graphical-session.target" ];
playerctl };
synology-drive-client };
];
}; };
environment.systemPackages = with pkgs; [
bc # HACK to get bsp-layout to work
brightnessctl
bsp-layout
feh
pamixer
playerctl
synology-drive-client
];
}; };
} }

View file

@ -9,13 +9,8 @@ let
cfg = config.my.programs.code; cfg = config.my.programs.code;
in in
{ {
options.my.programs.code = { options.my.programs.code.enable = mkEnableOption "code";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz = { home-manager.users.moritz = {
programs.vscode = { programs.vscode = {

View file

@ -21,6 +21,7 @@
./kakoune.nix ./kakoune.nix
./kitty.nix ./kitty.nix
./ledger ./ledger
./logseq.nix
./python.nix ./python.nix
./rofi ./rofi
./spotify.nix ./spotify.nix

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.direnv; cfg = config.my.programs.direnv;
in in
{ {
options.my.programs.direnv = { options.my.programs.direnv.enable = mkEnableOption "direnv";
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.programs.direnv = { home-manager.users.moritz.programs.direnv = {

View file

@ -8,94 +8,87 @@
with lib; with lib;
let let
cfg = config.my.programs.emacs; cfg = config.my.programs.emacs;
myEmacs = with pkgs; ((emacsPackagesFor emacsUnstable).emacsWithPackages myEmacs = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages
(epkgs: [ epkgs.vterm ])); (epkgs: [ epkgs.vterm ]));
in in
{ {
options.my.programs.emacs = { options.my.programs.emacs.enable = mkEnableOption "emacs";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.shell.aliases = { my.shell.aliases = {
emacs = "emacsclient -t -a 'emacs -t'"; emacs = "emacsclient -t -a 'emacs -t'";
}; };
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
environment.systemPackages = with pkgs; [
### Emacs itself
binutils # native-comp needs 'as', provided by this
myEmacs
### Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
gnutls # for TLS connectivity
### Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
zstd # for undo-fu-session/undo-tree compression
### Module dependencies
## :checkers
# spell
(hunspellWithDicts [
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.de_DE
])
# grammar
languagetool
## : tools
# lookup & org +roam
sqlite
gcc # HACK to get emacsqlite binary
wordnet
graphviz
## :lang
# latex & org (latex previews)
stable.texlive.combined.scheme-full # HACK to fix broken perl package
texlab
# nix
nixfmt # for formating nix
rnix-lsp
# markdown & org +pandoc
pandoc
# python
nodePackages.pyright
# sh
nodePackages.bash-language-server
## :email
# mu4e
mu
isync
## :app
# everywhere
xdotool
xorg.xwininfo
xclip
xorg.xprop
];
home-manager.users.moritz = { home-manager.users.moritz = {
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ]; home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
services.emacs = { services.emacs = {
enable = true; enable = true;
package = myEmacs; package = myEmacs;
}; };
home.packages = with pkgs; [
### Emacs itself
binutils # native-comp needs 'as', provided by this
myEmacs
### Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
gnutls # for TLS connectivity
### Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
zstd # for undo-fu-session/undo-tree compression
### Module dependencies
## :checkers
# spell
(hunspellWithDicts [
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.de_DE
])
# grammar
languagetool
## : tools
# lookup & org +roam
sqlite
gcc # HACK to get emacsqlite binary
wordnet
graphviz
## :lang
# latex & org (latex previews)
stable.texlive.combined.scheme-full # HACK to fix broken perl package
texlab
# nix
nixfmt # for formating nix
rnix-lsp
# markdown & org +pandoc
pandoc
# python
nodePackages.pyright
# sh
nodePackages.bash-language-server
## :email
# mu4e
mu
isync
## :app
# everywhere
xdotool
xorg.xwininfo
xclip
xorg.xprop
];
}; };
}; };
} }

View file

@ -12,11 +12,7 @@ let
in in
{ {
options.my.programs.firefox = { options.my.programs.firefox = {
enable = mkOption { enable = mkEnableOption "firefox";
default = false;
type = types.bool;
example = true;
};
arkenfox = { arkenfox = {
enable = mkEnableOption "arkenfox"; enable = mkEnableOption "arkenfox";
overrides = mkOption { overrides = mkOption {

View file

@ -14,17 +14,12 @@ let
exportedVariables = lib.concatStringsSep "\n" exportVariables; exportedVariables = lib.concatStringsSep "\n" exportVariables;
in in
{ {
options.my.programs.fish = { options.my.programs.fish.enable = mkEnableOption "fish";
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# set as default shell # set as default shell
users.users.moritz.shell = pkgs.fish; users.users.moritz.shell = pkgs.fish;
environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish pisces ];
# needed for nix completions # needed for nix completions
programs.fish.enable = true; programs.fish.enable = true;
@ -88,7 +83,6 @@ in
fzf.enableFishIntegration = true; fzf.enableFishIntegration = true;
starship.enableFishIntegration = true; starship.enableFishIntegration = true;
}; };
home.packages = with pkgs.fishPlugins; [ fzf-fish pisces ];
}; };
}; };
} }

View file

@ -10,11 +10,7 @@ let
in in
{ {
options.my.programs.git = { options.my.programs.git = {
enable = mkOption { enable = mkEnableOption "git";
default = true;
type = types.bool;
example = false;
};
signing = mkOption { signing = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.gnome; cfg = config.my.programs.gnome;
in in
{ {
options.my.programs.gnome = { options.my.programs.gnome.enable = mkEnableOption "gnome";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware = { hardware = {

View file

@ -9,13 +9,8 @@ let
cfg = config.my.programs.gpg; cfg = config.my.programs.gpg;
in in
{ {
options.my.programs.gpg = { options.my.programs.gpg.enable = mkEnableOption "gpg";
enable = mkOption {
default = true;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.programs.gpg.enable = true; home-manager.users.moritz.programs.gpg.enable = true;
environment.shellInit = '' environment.shellInit = ''

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.helix; cfg = config.my.programs.helix;
in in
{ {
options.my.programs.helix = { options.my.programs.helix.enable = mkEnableOption "helix";
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.programs.helix = { home-manager.users.moritz.programs.helix = {

View file

@ -9,13 +9,8 @@ let
cfg = config.my.programs.hub; cfg = config.my.programs.hub;
in in
{ {
options.my.programs.hub = { options.my.programs.hub.enable = mkEnableOption "hub";
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
age.secrets = { age.secrets = {
github = { github = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.kakoune; cfg = config.my.programs.kakoune;
in in
{ {
options.my.programs.kakoune = { options.my.programs.kakoune.enable = mkEnableOption "kakoune";
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz = { home-manager.users.moritz = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.kitty; cfg = config.my.programs.kitty;
in in
{ {
options.my.programs.kitty = { options.my.programs.kitty.enable = mkEnableOption "kitty";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.shell.aliases.ssh = "kitty +kitten ssh"; my.shell.aliases.ssh = "kitty +kitten ssh";

View file

@ -9,48 +9,45 @@ let
cfg = config.my.programs.ledger; cfg = config.my.programs.ledger;
in in
{ {
options.my.programs.ledger = { options.my.programs.ledger.enable = mkEnableOption "ledger";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.shell.aliases = { my.shell = {
bal = "ledger bal"; variables = {
balcash = "ledger bal -R -X --current --flat ^assets:bank ^liabilities"; LEDGER_FILE = "/home/moritz/Nextcloud/Notes/ledger/main.ledger";
balnet = "ledger bal -R -X --current --depth 2 ^assets ^liabilities"; };
bud = ''ledger --budget --unbudgeted bal ^expenses -p "this month"''; aliases =
budr = ''ledger --budget reg -p "this month" ^expenses''; let
reg = "ledger reg -R -V --tail 15"; applyCommon = name: command: "${command} --payee note --strict --explicit";
}; in
home-manager.users.moritz = { mapAttrs applyCommon {
home.packages = with pkgs; let bal = "ledger bal";
reg-copy = writeShellApplication { balcash = "ledger bal -R -X --current --flat ^assets:bank ^liabilities";
name = "reg-copy"; balnet = "ledger bal -R -X --current --depth 2 ^assets ^liabilities";
bud = ''ledger bal --budget --unbudgeted -p "this month"'';
runtimeInputs = [ ledger xclip ]; budr = ''ledger reg --budget --unbudgeted -p "this month"'';
reg = "ledger reg -R -V --tail 15";
text = ''
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
echo "$table"
echo "$table" | xclip -selection clipboard
'';
}; };
in };
[ ledger reg-copy ]; environment.systemPackages = with pkgs; let
reg-copy = writeShellApplication {
name = "reg-copy";
runtimeInputs = [ ledger xclip ];
text = ''
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
echo "$table"
echo "$table" | xclip -selection clipboard
'';
};
in
[ ledger reg-copy hledger hledger-ui hledger-web ];
home-manager.users.moritz = {
xdg.configFile = { xdg.configFile = {
"fish/completions/ledger.fish" = { "fish/completions/ledger.fish" = {
text = builtins.readFile ./ledger.fish; text = builtins.readFile ./ledger.fish;
}; };
"ledger/ledgerrc".text = ''
--strict
--explicit
--payee note
--file ~/Notes/ledger/main.ledger
'';
}; };
}; };
}; };

View file

@ -0,0 +1,20 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.logseq;
in
{
options.my.programs.logseq.enable = mkEnableOption "logseq";
config = mkIf cfg.enable {
users.users.moritz.packages = with pkgs; [
logseq
];
xdg.mime.defaultApplications."x-scheme-handler/logseq" = "logseq.desktop";
};
}

View file

@ -30,7 +30,14 @@ in
example = [ "python39" ]; example = [ "python39" ];
}; };
packages = mkOption { packages = mkOption {
default = [ "isort" "pytest" "flake8" "python-lsp-server" ]; default = [
"flake8"
"isort"
"mypy"
"poetry"
"pytest"
"python-lsp-server"
];
type = with types; listOf (enum commonPackages); type = with types; listOf (enum commonPackages);
}; };
}; };

View file

@ -7,51 +7,16 @@
with lib; with lib;
let let
cfg = config.my.programs.rofi; cfg = config.my.programs.rofi;
rofi-bluetooth = with pkgs; stdenv.mkDerivation rec {
pname = "rofi-bluetooth";
version = "unstable-2021-03-05";
src = fetchFromGitHub {
repo = pname;
owner = "nickclyde";
# https://github.com/nickclyde/rofi-bluetooth/issues/19
rev = "893db1f2b549e7bc0e9c62e7670314349a29cdf2";
sha256 = "sha256-3oROJKEQCuSnLfbJ+JSSc9hcmJTPrLHRQJsrUcaOMss=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
install -D --target-directory=$out/bin/ ./rofi-bluetooth
wrapProgram $out/bin/rofi-bluetooth \
--prefix PATH ":" ${lib.makeBinPath [ rofi-unwrapped bluez ] }
runHook postInstall
'';
meta = with lib; {
description = "Rofi-based interface to connect to bluetooth devices and display status info";
homepage = "https://github.com/nickclyde/rofi-bluetooth";
license = licenses.gpl3Only;
maintainers = with maintainers; [ MoritzBoehme ];
platforms = platforms.linux;
};
};
in in
{ {
options.my.programs.rofi = { options.my.programs.rofi.enable = mkEnableOption "rofi";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
(lib.mkIf config.hardware.bluetooth.enable rofi-bluetooth)
rofi-power-menu
];
home-manager.users.moritz = { home-manager.users.moritz = {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
@ -59,11 +24,6 @@ in
pkgs.rofi.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; }; pkgs.rofi.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; };
extraConfig = { combi-modi = "drun,window,emoji"; }; extraConfig = { combi-modi = "drun,window,emoji"; };
}; };
home.packages = with pkgs; [
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
(lib.mkIf config.hardware.bluetooth.enable rofi-bluetooth)
rofi-power-menu
];
xdg = { xdg = {
enable = true; enable = true;
configFile."networkmanager-dmenu/config.ini".text = '' configFile."networkmanager-dmenu/config.ini".text = ''

View file

@ -9,21 +9,15 @@ let
cfg = config.my.programs.spotify; cfg = config.my.programs.spotify;
in in
{ {
options.my.programs.spotify = { options.my.programs.spotify.enable = mkEnableOption "spotify";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
age.secrets.spotifyd = { age.secrets.spotifyd = {
file = ../../secrets/spotifyd.age; file = ../../secrets/spotifyd.age;
owner = "1000"; owner = "1000";
}; };
environment.systemPackages = with pkgs; [ spotify-tui sptlrx ];
home-manager.users.moritz = { home-manager.users.moritz = {
home.packages = with pkgs; [ spotify-tui sptlrx ];
services.spotifyd = { services.spotifyd = {
enable = true; enable = true;
package = pkgs.spotifyd.override { withMpris = true; }; package = pkgs.spotifyd.override { withMpris = true; };

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.sway; cfg = config.my.programs.sway;
in in
{ {
options.my.programs.sway = { options.my.programs.sway.enable = mkEnableOption "sway";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.opengl = { hardware.opengl = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.thunar; cfg = config.my.programs.thunar;
in in
{ {
options.my.programs.thunar = { options.my.programs.thunar.enable = mkEnableOption "thunar";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -26,7 +20,7 @@ in
]; ];
services.gvfs = { services.gvfs = {
enable = true; enable = true;
package = lib.mkForce pkgs.gnome3.gvfs; package = lib.mkForce pkgs.gnome.gvfs;
}; };
}; };
} }

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.xmonad; cfg = config.my.programs.xmonad;
in in
{ {
options.my.programs.xmonad = { options.my.programs.xmonad.enable = mkEnableOption "xmonad";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services = { services = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.programs.zathura; cfg = config.my.programs.zathura;
in in
{ {
options.my.programs.zathura = { options.my.programs.zathura.enable = mkEnableOption "zathura";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.programs.zathura = { home-manager.users.moritz.programs.zathura = {

View file

@ -11,13 +11,7 @@ let
shellConfig = config.my.shell; shellConfig = config.my.shell;
in in
{ {
options.my.programs.zsh = { options.my.programs.zsh.enable = mkEnableOption "zsh";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];

View file

@ -68,19 +68,6 @@
# So we don't have to do this later... # So we don't have to do this later...
security.acme.acceptTerms = true; security.acme.acceptTerms = true;
# Enable doas as an alternative to sudo
security.doas = {
enable = lib.mkDefault true;
extraRules = [
# Do not ask for a password again for some time after the user successfully authenticates.
{
groups = [ "wheel" "doas" ];
persist = true;
}
];
};
security.sudo.enable = !config.security.doas.enable;
# SSH # SSH
services.openssh = { services.openssh = {
# Disable ssh password login # Disable ssh password login

View file

@ -6,6 +6,7 @@
imports = [ imports = [
./dunst.nix ./dunst.nix
./kdeconnect.nix ./kdeconnect.nix
./mullvad.nix
./openconnect.nix ./openconnect.nix
./openvpn.nix ./openvpn.nix
./picom.nix ./picom.nix

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.dunst; cfg = config.my.services.dunst;
in in
{ {
options.my.services.dunst = { options.my.services.dunst.enable = mkEnableOption "dunst";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home-manager.users.moritz = { home-manager.users.moritz = {

View file

@ -13,13 +13,7 @@ let
cfg = config.my.services.kdeconnect; cfg = config.my.services.kdeconnect;
in in
{ {
options.my.services.kdeconnect = { options.my.services.kdeconnect.enable = mkEnableOption "kdeconnect";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.moritz.services.kdeconnect.enable = mkIf (!config.my.programs.gnome.enable) true; home-manager.users.moritz.services.kdeconnect.enable = mkIf (!config.my.programs.gnome.enable) true;

View file

@ -0,0 +1,20 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.services.mullvad;
in
{
options.my.services.mullvad.enable = mkEnableOption "mullvad";
config = lib.mkIf cfg.enable {
services.mullvad-vpn.enable = true;
users.users.moritz.packages = with pkgs; [
mullvad-vpn
];
};
}

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.openconnect; cfg = config.my.services.openconnect;
in in
{ {
options.my.services.openconnect = { options.my.services.openconnect.enable = mkEnableOption "openconnect";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
networking.openconnect.interfaces = { networking.openconnect.interfaces = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.openvpn; cfg = config.my.services.openvpn;
in in
{ {
options.my.services.openvpn = { options.my.services.openvpn.enable = mkEnableOption "openvpn";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets = { age.secrets = {

View file

@ -9,13 +9,7 @@ let
cfg = config.my.services.picom; cfg = config.my.services.picom;
in in
{ {
options.my.services.picom = { options.my.services.picom.enable = mkEnableOption "picom";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home-manager.users.moritz = { home-manager.users.moritz = {
@ -30,6 +24,9 @@ in
glx-no-rebind-pixmap = true; glx-no-rebind-pixmap = true;
glx-no-stencil = true; glx-no-stencil = true;
# against flicker
unredir-if-possible = false;
# fastest swap method # fastest swap method
glx-swap-method = 1; glx-swap-method = 1;
@ -45,7 +42,6 @@ in
# needed for nvidia with glx backend # needed for nvidia with glx backend
xrender-sync-fence = true; xrender-sync-fence = true;
}; };
experimentalBackends = true;
inactiveOpacity = 0.97; inactiveOpacity = 0.97;
opacityRules = [ "100:fullscreen" "100:class_g = 'Polybar'" ]; opacityRules = [ "100:fullscreen" "100:class_g = 'Polybar'" ];
vSync = true; vSync = true;

View file

@ -5,13 +5,7 @@ let
cfg = config.my.services.printing; cfg = config.my.services.printing;
in in
{ {
options.my.services.printing = { options.my.services.printing.enable = mkEnableOption "printing";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services = { services = {

View file

@ -5,13 +5,7 @@ let
cfg = config.my.services.redshift; cfg = config.my.services.redshift;
in in
{ {
options.my.services.redshift = { options.my.services.redshift.enable = mkEnableOption "redshift";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.redshift.enable = true; services.redshift.enable = true;

View file

@ -9,13 +9,7 @@ let
cfg = config.my.virtualisation.podman; cfg = config.my.virtualisation.podman;
in in
{ {
options.my.virtualisation.podman = { options.my.virtualisation.podman.enable = mkEnableOption "podman";
enable = mkOption {
default = false;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.podman = { virtualisation.podman = {

View file

@ -9,20 +9,17 @@ let
cfg = config.my.virtualisation.libvirtd; cfg = config.my.virtualisation.libvirtd;
in in
{ {
options.my.virtualisation.libvirtd = { options.my.virtualisation.libvirtd.enable = mkEnableOption "libvirtd";
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;
package = pkgs.libvirt; package = pkgs.libvirt;
}; };
home-manager.users.moritz.home.packages = with pkgs; [ virt-manager ];
users.users.moritz.extraGroups = [ "libvirtd" ]; users.users.moritz = {
extraGroups = [ "libvirtd" ];
packages = with pkgs; [ virt-manager ];
};
}; };
} }

View file

@ -1,6 +1,7 @@
{ inputs }: final: prev: { { inputs }: final: prev: {
inherit (inputs.comma.packages."${prev.system}") comma; inherit (inputs.comma.packages."${prev.system}") comma;
nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}"; nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}";
kdeconnect = prev.plasma5Packages.kdeconnect-kde;
agenix = inputs.agenix.defaultPackage."${prev.system}"; agenix = inputs.agenix.defaultPackage."${prev.system}";
master = import inputs.master { master = import inputs.master {
inherit (prev) system; inherit (prev) system;

Binary file not shown.

View file

@ -1,15 +0,0 @@
age-encryption.org/v1
-> ssh-ed25519 CjuqfA 42ZhJgcVV9rxkVmvEj4aCeeVx4Tldtx2L54hS1mZCxE
dqSOKoGxChgMHmiY4SgoJqxH9nSGlLVnmbke2+xZHYA
-> ssh-ed25519 QRYDmg yHGmTle30O7BQ7SFG7m5gaZctmwT26LNfJPbocs1WTM
lQZa4yp8R8UZpG+/JGuZ4z4gxlGXColGCs8qlKFyCP4
-> ssh-ed25519 wG6LYg wokwDVXoQaZlpX4qM/2OmSo9lbDFIqqg/dKesIETJBI
0MBgUClVsQksxRCa4WhSvQlzZRl673CZeeP7PVfHtCI
-> ssh-ed25519 ZYd7Zg cGYmLN+nSv5NGR+HMbofhtzbmZ/LjftCpcUIbZ5Z+hY
3u9UgW7TDWX+dfuJuIwRxSkwTOLrUw1znEkU9ao5Ltw
-> ssh-ed25519 as9VYQ dK/VaOUKsr58sTfiF3qjUPHi3mxfioW5IXkyMmx+xCY
mTF8kUni1pxBrcE+j4mHZx/Zs8D8SgqWjfRkDH66m5k
-> Pzw,"-grease R`h7fZ+ 'U[<2@ `Ay6[
3a6T
--- I5udQOeevThPQ3VGfarWDe+n1y1DnC1vNqd+hU53ENw
­¶Ç»·<E28093>@ŠÅC¶þ¢ ˜ÉÿwWÛøLouåsº»¾Ý f½zÐëb+Ùû÷“4ÿŒ

View file

@ -13,8 +13,6 @@ in
{ {
"nordvpn.age".publicKeys = all; "nordvpn.age".publicKeys = all;
"spotifyd.age".publicKeys = all; "spotifyd.age".publicKeys = all;
"email-desktop.age".publicKeys = all;
"email-laptop.age".publicKeys = all;
"home-vpn.age".publicKeys = all; "home-vpn.age".publicKeys = all;
"home-vpn-password.age".publicKeys = all; "home-vpn-password.age".publicKeys = all;
"github.age".publicKeys = all; "github.age".publicKeys = all;