Started migration towards flake-parts

Plus shit ton many changes I still had to commit
This commit is contained in:
Andrea Ciceri 2023-03-12 17:05:03 +01:00
parent 261b763848
commit f05ee0a658
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
18 changed files with 752 additions and 460 deletions

505
flake.lock generated
View file

@ -2,14 +2,15 @@
"nodes": { "nodes": {
"agenix": { "agenix": {
"inputs": { "inputs": {
"darwin": "darwin",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1673301561, "lastModified": 1676599101,
"narHash": "sha256-gRUWHbBAtMuPDJQXotoI8u6+3DGBIUZHkyQWpIv7WpM=", "narHash": "sha256-CKS6UsOGhoNxGDBt9wyFiWHvtng/+BMAJ4G8ahhe1DE=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "42d371d861a227149dc9a7e03350c9ab8b8ddd68", "rev": "de657061b13cf329c57a1a9730a5049a971b40b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -30,11 +31,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1676243541, "lastModified": 1677147990,
"narHash": "sha256-33E6mVXWTEgOSrUNeZXtiPqIdYBMMRjN6T0PYHtNlxw=", "narHash": "sha256-VO83jKa/4LdwKmtEhF32+O95jvC1qyVT/scgDcWMsUw=",
"owner": "aciceri", "owner": "aciceri",
"repo": "emacs", "repo": "emacs",
"rev": "0487fc1dd3fd89d4264562e424a07a1a955c9d88", "rev": "a412295c6d1491d96db9e9f26b932eb806c9f5ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -51,11 +52,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1670543350, "lastModified": 1676319017,
"narHash": "sha256-JMYwGa2nJPInuVuYbR3XSGUJewTDyeoTDQaALydduko=", "narHash": "sha256-gHyshpxoQAc/3sI3eChqmSCvsBimy+Z6EkzwA3aAYgA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "comma", "repo": "comma",
"rev": "1b07c19774129ebce3af846fb571e1c0b97f24a3", "rev": "c4001264668c09d44d765e5ccb1182f291cd91a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -80,6 +81,28 @@
"type": "github" "type": "github"
} }
}, },
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"devshell": { "devshell": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -112,7 +135,7 @@
"nci", "nci",
"devshell" "devshell"
], ],
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"flake-utils-pre-commit": [ "flake-utils-pre-commit": [
"helix", "helix",
"nci" "nci"
@ -167,11 +190,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1676196577, "lastModified": 1677061209,
"narHash": "sha256-nzXTh2VQZDyzIc6ed2+qoRT/FUKkQQAaLEFPy2MKB+A=", "narHash": "sha256-WIddVDpQy1d5xA/hKT8z9WwqlcP+RRIAy0cTUtWU7bg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "25bc792c9fe3ab354e7b51539b4da72ac821dde9", "rev": "6c39228d24c69ff0d52aedb8c9976bb796ebda2a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -183,11 +206,11 @@
"emacs-src": { "emacs-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1676224660, "lastModified": 1677076548,
"narHash": "sha256-9CkPx2CHhrwLoDerjMgYnFxeTC3f8IBf8F9rxVldxe0=", "narHash": "sha256-yWln8CoiNJpQ8CmjNYaXFj00aJa5mSUIYLdkN+c5KbQ=",
"ref": "emacs-29", "ref": "emacs-29",
"rev": "eb2b0931cf1258b875b031f81a3685eda8ddf5cb", "rev": "20c654b6f8fa24ff458e09a1eb101ba198e671f8",
"revCount": 164478, "revCount": 164627,
"type": "git", "type": "git",
"url": "git://git.savannah.gnu.org/emacs.git" "url": "git://git.savannah.gnu.org/emacs.git"
}, },
@ -245,38 +268,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -299,6 +290,24 @@
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_2" "nixpkgs-lib": "nixpkgs-lib_2"
}, },
"locked": {
"lastModified": 1678379998,
"narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c13d60b89adea3dc20704c045ec4d50dd964d447",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": { "locked": {
"lastModified": 1668450977, "lastModified": 1668450977,
"narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=", "narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=",
@ -313,6 +322,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1678379998,
"narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c13d60b89adea3dc20704c045ec4d50dd964d447",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
@ -353,8 +380,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "flake-utils", "owner": "numtide",
"type": "indirect" "repo": "flake-utils",
"type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_4": {
@ -367,9 +395,8 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "id": "flake-utils",
"repo": "flake-utils", "type": "indirect"
"type": "github"
} }
}, },
"gitignore": { "gitignore": {
@ -394,27 +421,6 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": {
"inputs": {
"nixpkgs": [
"preCommitHooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"helix": { "helix": {
"inputs": { "inputs": {
"nci": "nci", "nci": "nci",
@ -422,11 +428,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1674109388, "lastModified": 1676614658,
"narHash": "sha256-IWV7MmZ2SyO4jtbxwdtso3QT9OBYFzhIwVU6+FyUWdU=", "narHash": "sha256-+F2PN8P0vk3gix9oBflTg0G9ESeBlZYaNlMGqy/0K9A=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "efeec1282cd82e255f54b10e94c51f51294598eb", "rev": "f7edc34e7b0dd4cd0b6582ee32cc43d1c79d7dd7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -443,11 +449,11 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1673343300, "lastModified": 1676367705,
"narHash": "sha256-5Xdj6kpXYMie0MlnGwqK5FaMdsedxvyuakWtyKB3zaQ=", "narHash": "sha256-un5UbRat9TwruyImtwUGcKF823rCEp4fQxnsaLFL7CM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "176e455371a8371586e8a3ff0d56ee9f3ca2324e", "rev": "da72e6fc6b7dc0c3f94edbd310aae7cd95c678b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -459,11 +465,11 @@
"kernel-src": { "kernel-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1670395302, "lastModified": 1678442395,
"narHash": "sha256-IZdeXSvGips2OPTwXljGPTeR2Kpx70NGQGF0Cd9xa+0=", "narHash": "sha256-5q9ZqD+TQmLjKQI/sQetHHOgFRmwoNustb1I0M0f3ok=",
"owner": "radxa", "owner": "radxa",
"repo": "kernel", "repo": "kernel",
"rev": "ca15bbe36e6c087c96a603db7cc491a01d9a6467", "rev": "75f35d0549b7588cc561ed63b4246130c38a9c69",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -521,13 +527,33 @@
"type": "github" "type": "github"
} }
}, },
"nil": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1676390054,
"narHash": "sha256-w0KvrM+9WIEYr0juDh4Vs39ed2IaT0T696fp9pZ7i1I=",
"owner": "oxalica",
"repo": "nil",
"rev": "944d5c335531778a1d7b54a97bf7fb5ec0c3e976",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "nil",
"type": "github"
}
},
"nixosHardware": { "nixosHardware": {
"locked": { "locked": {
"lastModified": 1673440569, "lastModified": 1675933606,
"narHash": "sha256-FQ5o0yI+MH9MgfseeGDsVIIpIqv3BCgq+0NzncuZ9Zo=", "narHash": "sha256-y427VhPQHOKkYvkc9MMsL/2R7M11rQxzsRdRLM3htx8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "88016c96c3c338aa801695cdd9f186820bcfe4d6", "rev": "44ae00e02e8036a66c08f4decdece7e3bbbefee2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -538,11 +564,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1665732960, "lastModified": 1674641431,
"narHash": "sha256-WBZ+uSHKFyjvd0w4inbm0cNExYTn8lpYFcHEes8tmec=", "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4428e23312933a196724da2df7ab78eb5e67a88e", "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -552,6 +578,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-kernel": {
"locked": {
"lastModified": 1656239181,
"narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
}
},
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
@ -571,6 +613,24 @@
} }
}, },
"nixpkgs-lib_2": { "nixpkgs-lib_2": {
"locked": {
"dir": "lib",
"lastModified": 1678375444,
"narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_3": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1665349835, "lastModified": 1665349835,
@ -588,6 +648,24 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib_4": {
"locked": {
"dir": "lib",
"lastModified": 1678375444,
"narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1671271954, "lastModified": 1671271954,
@ -604,60 +682,45 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1671271954,
"narHash": "sha256-cSvu+bnvN08sOlTBWbBrKaBHQZq8mvk8bgpt0ZJ2Snc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d513b448cc2a6da2c8803e3c197c9fc7e67b19e3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgsStable": { "nixpkgsStable": {
"locked": { "locked": {
"lastModified": 1672580127, "lastModified": 1676546582,
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", "narHash": "sha256-MJ+PXNmUyxnMTFoss7G2lEcUY2cfYZM6RudBAL5aX1k=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0874168639713f547c05947c76124f78441ea46c", "rev": "2fb7d749c084890192b2cd08ba264e5e4a14df1b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-22.05", "ref": "nixos-22.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgsUnstable": { "nixpkgsUnstable": {
"locked": { "locked": {
"lastModified": 1673659004, "lastModified": 1677342105,
"narHash": "sha256-fAIbnEt+uBcBfIkPo0KRKg0++2yPyubkNPGNVvqxmtQ=", "narHash": "sha256-kv1fpkfCJGb0M+LZaCHFUuIS9kRIwyVgupHu86Y28nc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f907e2ee5ed7a41e5c57f0d88f09a9fcb388ec0f", "rev": "b1f87ca164a9684404c8829b851c3586c4d9f089",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1676110339, "lastModified": 1673540789,
"narHash": "sha256-kOS/L8OOL2odpCOM11IevfHxcUeE0vnZUQ74EOiwXcs=", "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e5530aba13caff5a4f41713f1265b754dc2abfd8", "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -701,65 +764,63 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1672262501, "lastModified": 1675309347,
"narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=", "narHash": "sha256-D3CQ6HRDT2m3XJlrzb5jKq4vNFR5xFTEFKC7iSjlFpM=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f", "rev": "006c3bd4dd2f5d1d2094047f307cbf9e2b73d9c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1671271357, "lastModified": 1675942811,
"narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=", "narHash": "sha256-/v4Z9mJmADTpXrdIlAjFa1e+gkpIIROR670UVDQFwIw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "40f79f003b6377bd2f4ed4027dde1f8f922995dd", "rev": "724bfc0892363087709bd3a5a1666296759154b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1678470307,
"narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0c4800d579af4ed98ecc47d464a5e7b0870c4b1f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": {
"locked": {
"lastModified": 1656239181,
"narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
}
},
"nom": { "nom": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_5",
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1672353191, "lastModified": 1676243887,
"narHash": "sha256-e9OwOsD2lfJ8WfcIEcGU6tY9LWB2VGnKDEC4ZKfKJVc=", "narHash": "sha256-iZV4n5rbnFaVg03HBxOYQym1FTH1TL1YxLptoLizACs=",
"owner": "maralorn", "owner": "maralorn",
"repo": "nix-output-monitor", "repo": "nix-output-monitor",
"rev": "9345278323e8763ca04ede5429c72655c4cef0bf", "rev": "e0c5df1056532aa1beba173825ad61a495b3274f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -770,11 +831,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1673661479, "lastModified": 1676619352,
"narHash": "sha256-zdM1dKVrtQyHfMUKQJSrm1xrQbdrA4yFdS/bODZSHPs=", "narHash": "sha256-a9pQbtOcUYS9boD6+lQqPe0WzME0x8yzZk365w9XGbM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "dcb9bbb764666a4ecc94d8319aed1ffb5f8efe82", "rev": "d2d70316f27384cf53e0f3c6cf2fd73e4744555a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -783,9 +844,25 @@
"type": "github" "type": "github"
} }
}, },
"panfork": {
"flake": false,
"locked": {
"lastModified": 1670633863,
"narHash": "sha256-4eZHMiYS+sRDHNBtLZTA8ELZnLns7yT3USU5YQswxQ0=",
"owner": "panfork",
"repo": "mesa",
"rev": "120202c675749c5ef81ae4c8cdc30019b4de08f4",
"type": "gitlab"
},
"original": {
"owner": "panfork",
"repo": "mesa",
"type": "gitlab"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_2",
"flake-utils": [ "flake-utils": [
"nom", "nom",
"flake-utils" "flake-utils"
@ -811,40 +888,23 @@
"type": "github" "type": "github"
} }
}, },
"preCommitHooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_4",
"gitignore": "gitignore_2",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1673627351,
"narHash": "sha256-oppRxEg/7ICcG67ErBvu1UlXt3su6zMcNoQmKaHPs5I=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "496e4505c2ddf5f205242eae8064d7d89cd976c0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"rock5b": { "rock5b": {
"inputs": { "inputs": {
"fan-control": "fan-control", "fan-control": "fan-control",
"flake-parts": "flake-parts_4",
"kernel-src": "kernel-src", "kernel-src": "kernel-src",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_7",
"nixpkgs-kernel": "nixpkgs-kernel",
"panfork": "panfork",
"tow-boot": "tow-boot",
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1672309501, "lastModified": 1678619682,
"narHash": "sha256-M6LqzxQwBP9aMI1hCxfL0OwWinqx3NEXlU/8UlwtxFY=", "narHash": "sha256-Om3Pe5Rss96jVh8Ncq72eFyu/ev8UO3iZZC8R0n2iAs=",
"owner": "aciceri", "owner": "aciceri",
"repo": "rock5b-nixos", "repo": "rock5b-nixos",
"rev": "50e282f459462711be939175285a0a4c83649ab6", "rev": "ba79eb513a6db741b9c9d3b717ea5f7a36ff4812",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -858,15 +918,17 @@
"agenix": "agenix", "agenix": "agenix",
"ccrEmacs": "ccrEmacs", "ccrEmacs": "ccrEmacs",
"comma": "comma", "comma": "comma",
"flake-parts": "flake-parts_2",
"helix": "helix", "helix": "helix",
"homeManager": "homeManager", "homeManager": "homeManager",
"nil": "nil",
"nixosHardware": "nixosHardware", "nixosHardware": "nixosHardware",
"nixpkgsStable": "nixpkgsStable", "nixpkgsStable": "nixpkgsStable",
"nixpkgsUnstable": "nixpkgsUnstable", "nixpkgsUnstable": "nixpkgsUnstable",
"nom": "nom", "nom": "nom",
"nur": "nur", "nur": "nur",
"preCommitHooks": "preCommitHooks", "rock5b": "rock5b",
"rock5b": "rock5b" "treefmt-nix": "treefmt-nix_2"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -891,6 +953,89 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"nil",
"flake-utils"
],
"nixpkgs": [
"nil",
"nixpkgs"
]
},
"locked": {
"lastModified": 1675391458,
"narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"tow-boot": {
"flake": false,
"locked": {
"lastModified": 1677346757,
"narHash": "sha256-3SKlcZhfUaNz1bd/l/1B3D66NUk3sALVIyP8DHv41SU=",
"owner": "aciceri",
"repo": "Tow-Boot",
"rev": "85d099f3473effdeca409bd165175d64dfb37ecc",
"type": "github"
},
"original": {
"owner": "aciceri",
"ref": "rock5b",
"repo": "Tow-Boot",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"rock5b",
"nixpkgs"
]
},
"locked": {
"lastModified": 1678277086,
"narHash": "sha256-fQ1G72KhLWWf2z+ug9+4ErTEayvlcVQMul0qusKKBgk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "ec39cfa24342fdf0b04ae44592a191c4765f9c74",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nixpkgsUnstable"
]
},
"locked": {
"lastModified": 1678616506,
"narHash": "sha256-JBlOlpPj7VtzFTApEHioFl8YSVhyT0dMgymV8t7sW1g=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5ec73d38dde4c766a9ae19840fc6afa724096f00",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,

View file

@ -2,57 +2,53 @@
description = "A complete, declarative, and reproducible configuration of my entire Nix fleet"; description = "A complete, declarative, and reproducible configuration of my entire Nix fleet";
inputs = { inputs = {
nixpkgsUnstable.url = "github:NixOS/nixpkgs"; flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-22.05"; nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-22.11";
nixosHardware.url = "github:NixOS/nixos-hardware"; nixosHardware.url = "github:NixOS/nixos-hardware";
homeManager = { homeManager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgsUnstable"; inputs.nixpkgs.follows = "nixpkgsUnstable";
}; };
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
preCommitHooks.url = "github:cachix/pre-commit-hooks.nix";
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
comma.url = "github:nix-community/comma"; comma.url = "github:nix-community/comma";
rock5b.url = "github:aciceri/rock5b-nixos"; rock5b.url = "github:aciceri/rock5b-nixos";
ccrEmacs.url = "github:aciceri/emacs"; ccrEmacs.url = "github:aciceri/emacs";
helix.url = "github:helix-editor/helix"; helix.url = "github:helix-editor/helix";
nil.url = "github:oxalica/nil";
nom.url = "github:maralorn/nix-output-monitor"; nom.url = "github:maralorn/nix-output-monitor";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgsUnstable";
};
}; };
outputs = {self, ...} @ inputs: let
utils = import ./utils inputs;
inherit
(utils)
checkFormatting
formatApp
formatter
lib
mkDevShell
mkVmApps
nixosConfigurations
;
in {
inherit nixosConfigurations;
apps = lib.foldr lib.recursiveUpdate {} [ outputs = inputs @ {flake-parts, ...}:
(mkVmApps self.nixosConfigurations) flake-parts.lib.mkFlake {inherit inputs;} {
formatApp imports = [
# ./modules
# ./hmModules
./hosts
./packages
./shell
./formatting
]; ];
systems = ["x86_64-linux" "aarch64-linux"];
checks = checkFormatting ./.;
devShells = mkDevShell;
inherit formatter;
}; };
nixConfig = { nixConfig = {
extra-substituters = [ extra-substituters = [
"https://nix-community.cachix.org"
"https://aciceri-fleet.cachix.org" "https://aciceri-fleet.cachix.org"
"https://aciceri-emacs.cachix.org"
"https://rock5b-nixos.cachix.org" "https://rock5b-nixos.cachix.org"
"https://helix.cachix.org" "https://helix.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"aciceri-fleet.cachix.org-1:e1AodrwmzRWy0eQi3lUY71M41fp9Sq+UpuKKv705xsI=" "aciceri-fleet.cachix.org-1:e1AodrwmzRWy0eQi3lUY71M41fp9Sq+UpuKKv705xsI="
"aciceri-emacs.cachix.org-1:kxDGDFWV6LUj41tb8xmPRBI56UJSZOVveN49LZDUKdA="
"rock5b-nixos.cachix.org-1:bXHDewFS0d8pT90A+/YZan/3SjcyuPZ/QRgRSuhSPnA=" "rock5b-nixos.cachix.org-1:bXHDewFS0d8pT90A+/YZan/3SjcyuPZ/QRgRSuhSPnA="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
]; ];

11
formatting/default.nix Normal file
View file

@ -0,0 +1,11 @@
{inputs, ...}: {
imports = [
inputs.treefmt-nix.flakeModule
];
perSystem = {pkgs, ...}: {
treefmt.config = {
projectRootFile = ".git/config";
programs.alejandra.enable = true;
};
};
}

View file

@ -1,3 +1,3 @@
{ {lib, ...}: {
ccrEmacs.enable = true; ccrEmacs.enable = true;
} }

View file

@ -14,6 +14,7 @@
enableFXCastBridge = pkgs.system == "x86_64-linux"; enableFXCastBridge = pkgs.system == "x86_64-linux";
}; };
}; };
profiles.ccr = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
privacy-badger privacy-badger
ublock-origin ublock-origin
@ -26,9 +27,8 @@
ghosttext # or edit-with-emacs? ghosttext # or edit-with-emacs?
# fx_cast # TODO make PR to rycee NUR repo # fx_cast # TODO make PR to rycee NUR repo
]; ];
profiles.ccr = {
settings = { settings = {
"browser.startup.homepage" = "https://search.privatevoid.net/"; "browser.startup.homepage" = "https://searx.be";
"browser.search.region" = "IT"; "browser.search.region" = "IT";
"browser.search.isUS" = false; "browser.search.isUS" = false;
"distribution.searchplugins.defaultLocale" = "it-IT"; "distribution.searchplugins.defaultLocale" = "it-IT";

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
};
}

View file

@ -14,7 +14,7 @@
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
services.lorri.enable = true; services.lorri.enable = false; # I'm not using it
programs.exa = { programs.exa = {
enable = true; enable = true;
@ -44,6 +44,55 @@
}; };
}; };
# Playing with it sometimes
programs.nushell = {
enable = true;
configFile.text = ''
let-env config = {
show_banner: false
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
}
rm: {
always_trash: true # always act as if -t was given. Can be overridden with -p
}
cd: {
abbreviations: true # allows `cd s/o/f` to expand to `cd some/other/folder`
}
table: {
mode: compact # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
trim: {
methodology: wrapping # wrapping or truncating
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
}
}
history: {
max_size: 10000 # Session has to be reloaded for this to take effect
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
file_format: "plaintext" # "sqlite" or "plaintext"
}
completions: {
case_sensitive: false # set to true to enable case-sensitive completions
quick: true # set this to false to prevent auto-selecting completions when only one remains
partial: true # set this to false to prevent partial filling of the prompt
algorithm: "prefix" # prefix or fuzzy
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: null # check 'carapace_completer' above as an example
}
}
filesize: {
metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
}
}
'';
};
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;
@ -84,9 +133,6 @@
initExtra = '' initExtra = ''
[[ -z $INSIDE_EMACS ]] && source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh [[ -z $INSIDE_EMACS ]] && source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
''; '';
sessionVariables = {
EDITOR = "hx";
};
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -95,6 +141,6 @@
dig.dnsutils dig.dnsutils
zsh-completions zsh-completions
nix-zsh-completions nix-zsh-completions
nom # nom # FIXME disable on aarch64-linux, breaks everything :(
]; ];
} }

View file

@ -48,11 +48,20 @@
output = let output = let
bg = "${./wallpaper.svg} fill"; bg = "${./wallpaper.svg} fill";
in { in {
DP-1 = { DP-2 = {
res = "1900x1200";
pos = "0 0"; pos = "0 0";
inherit bg; inherit bg;
transform = "90";
};
DP-1 = {
res = "2560x1440";
pos = "1200 230";
inherit bg;
}; };
eDP-1 = { eDP-1 = {
res = "1920x1080";
pos = "3760 230";
inherit bg; inherit bg;
}; };
}; };
@ -97,16 +106,15 @@
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename" ${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
wl-copy -t video/mp4 < $filename wl-copy -t video/mp4 < $filename
''; '';
emacsclientAsTerminal = pkgs.writeShellScript "emacsclientAsTerminal" ''
emacsclient -c -F '\\'(name . "VTerm"))' -q --eval '\\'(vterm "/bin/zsh")'
'';
in in
lib.mkOptionDefault { lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c"; "${modifier}+x" = "exec emacsclient -c";
"${modifier}+b" = "exec qutebrowser"; "${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}"; "${modifier}+s" = "exec ${screenshotScript}";
"${modifier}+g" = "exec ${screenrecordingScript}"; # "${modifier}+g" = "exec ${screenrecordingScript}"; # FIXME
# "${modifier}+Shift+Enter" = "exec ${emacsclientAsTerminal}"; # FIXME "${modifier}+t" = ''
exec emacsclient -c -F "\'(name . \\"VTerm\\"))" -q --eval '(vterm (getenv "SHELL"))'
'';
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%"; "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-"; "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
}; };

132
hosts/default.nix Normal file
View file

@ -0,0 +1,132 @@
{
self,
lib,
config,
inputs,
...
}: {
options.fleet = {
hosts = lib.mkOption {
description = "Host configuration";
type = lib.types.attrsOf (lib.types.submodule {
options = {
name = lib.mkOption {
description = "Host name";
type = lib.types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
};
system = lib.mkOption {
description = "NixOS architecture (a.k.a. system)";
type = lib.types.str;
default = "x86_64-linux";
};
secrets = lib.mkOption {
description = "List of secrets names in the `secrets` folder";
type = lib.types.listOf lib.types.str;
default = [];
};
enableHomeManager = lib.mkOption {
description = "Enable home-manager module";
type = lib.types.bool;
default = true;
};
overlays = lib.mkOption {
description = "Enabled Nixpkgs overlays";
type = lib.types.listOf (lib.mkOptionType {
name = "nixpkgs-overlay";
description = "nixpkgs overlay";
check = lib.isFunction;
merge = lib.mergeOneOption;
});
default = with inputs; [
agenix.overlays.default
comma.overlays.default
nur.overlay
nil.overlays.default
];
};
extraModules = lib.mkOption {
description = "Extra NixOS modules";
type = lib.types.listOf lib.types.deferredModule;
default = [];
};
extraHmModules = lib.mkOption {
description = "Extra home-manager modules";
type = lib.types.listOf lib.types.deferredModule;
default = [];
};
extraHmModulesUser = lib.mkOption {
description = "User for which to import extraHmModulesUser";
type = lib.types.str;
default = "ccr";
};
};
});
default = {};
};
_mkNixosConfiguration = lib.mkOption {
description = "Function returning a proper NixOS configuration";
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
internal = true;
default = hostname: config:
inputs.nixpkgsUnstable.lib.nixosSystem {
system = config.system;
modules =
[
({lib, ...}: {
networking.hostName = lib.mkForce hostname;
nixpkgs.overlays = config.overlays;
})
"${self.outPath}/hosts/${hostname}"
]
++ (lib.optionals (config.secrets != []) [
inputs.agenix.nixosModules.default
({lib, ...}: {
age.secrets =
lib.filterAttrs
(name: _: builtins.elem name config.secrets)
(lib.mapAttrs' (name: _: {
name = lib.removeSuffix ".age" (builtins.baseNameOf name);
value.file = "${self.outPath}/${name}";
}) (import "${self.outPath}/secrets"));
})
])
++ (lib.optionals config.enableHomeManager [
inputs.homeManager.nixosModule
{home-manager.users."${config.extraHmModulesUser}".imports = config.extraHmModules;}
])
++ config.extraModules;
specialArgs = {
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
};
};
};
};
# TODO Add per host:
# - apps to run as VMs
# - checks
# - deploy scripts (`nixos-rebuild`)
config = {
fleet.hosts = {
# TODO add `hs` and `pbp`
thinkpad = {
extraModules = [inputs.nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen];
extraHmModules = [
inputs.ccrEmacs.hmModules.default
];
secrets = ["cachix"];
};
rock5b = {
system = "aarch64-linux";
extraModules = [inputs.rock5b.nixosModules.default];
};
};
flake.nixosConfigurations =
lib.mapAttrs
config.fleet._mkNixosConfiguration
config.fleet.hosts;
};
}

View file

@ -1,13 +1,72 @@
{fleetModules, ...}: { {
fleetModules,
lib,
pkgs,
config,
...
}: {
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
] ]
++ fleetModules [ ++ (fleetModules [
"common" "common"
"ssh" "ssh"
"ccr" "ccr"
]; ]);
ccr.enable = true; ccr.enable = true;
services.rock5b-fan-control.enable = true;
nixpkgs.config.permittedInsecurePackages = [
"libav-11.12"
];
fileSystems."/mnt/film" = {
device = "//ccr.ydns.eu/film";
fsType = "cifs";
options = let
credentials = pkgs.writeText "credentials" ''
username=guest
password=
'';
in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"];
};
fileSystems."/mnt/archivio" = {
device = "//ccr.ydns.eu/archivio";
fsType = "cifs";
options = let
credentials = pkgs.writeText "credentials" ''
username=guest
password=
'';
in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"];
};
environment.systemPackages = with pkgs; [
kodi-rock5b
cifs-utils
];
users.extraUsers.kodi = {
isNormalUser = true;
uid = 1002;
extraGroups = ["video" "input"];
};
# Waiting for https://github.com/NixOS/nixpkgs/issues/140304
services.getty = let
script = pkgs.writeText "login-program.sh" ''
if [[ "$(tty)" == '/dev/tty1' ]]; then
${pkgs.shadow}/bin/login -f kodi;
else
${pkgs.shadow}/bin/login;
fi
'';
in {
loginProgram = "${pkgs.bash}/bin/sh";
loginOptions = toString script;
extraArgs = ["--skip-login"];
};
} }

View file

@ -6,6 +6,8 @@
}; };
}; };
nixpkgs.hostPlatform = "aarch64-linux";
swapDevices = []; swapDevices = [];
boot.loader = { boot.loader = {

View file

@ -14,7 +14,7 @@
"adb" "adb"
"audio" "audio"
"battery" "battery"
"binfmt" # "binfmt"
"bluetooth" "bluetooth"
"ccr" "ccr"
"common" "common"
@ -29,6 +29,7 @@
"udisks2" "udisks2"
"xdg" "xdg"
"nix-development" "nix-development"
"clamav"
]; ];
ccr = { ccr = {
@ -58,6 +59,7 @@
"xdg" "xdg"
"zathura" "zathura"
"chrome" "chrome"
"obs-studio"
]; ];
packages = with pkgs; [ packages = with pkgs; [
comma comma
@ -78,7 +80,7 @@
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelPackages = pkgs.linuxPackages_zen;
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -0,0 +1,10 @@
{
services.clamav = {
daemon.enable = true;
updater = {
enable = true;
frequency = 1;
interval = "daily";
};
};
}

View file

@ -32,47 +32,47 @@
allowedUDPPorts = [8080]; allowedUDPPorts = [8080];
}; };
environment.systemPackages = with pkgs; [xboxdrv cifs-utils]; # environment.systemPackages = with pkgs; [xboxdrv cifs-utils];
fileSystems."/mnt/film" = { # fileSystems."/mnt/film" = {
device = "//ccr.ydns.eu/film"; # device = "//ccr.ydns.eu/film";
fsType = "cifs"; # fsType = "cifs";
options = let # options = let
credentials = pkgs.writeText "credentials" '' # credentials = pkgs.writeText "credentials" ''
username=guest # username=guest
password= # password=
''; # '';
in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"]; # in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"];
}; # };
fileSystems."/mnt/archivio" = { # fileSystems."/mnt/archivio" = {
device = "//ccr.ydns.eu/archivio"; # device = "//ccr.ydns.eu/archivio";
fsType = "cifs"; # fsType = "cifs";
options = let # options = let
credentials = pkgs.writeText "credentials" '' # credentials = pkgs.writeText "credentials" ''
username=guest # username=guest
password= # password=
''; # '';
in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"]; # in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"];
}; # };
systemd.services.xboxdrv = { # systemd.services.xboxdrv = {
wantedBy = ["multi-user.target"]; # wantedBy = ["multi-user.target"];
after = ["network.target"]; # after = ["network.target"];
serviceConfig = { # serviceConfig = {
Type = "forking"; # Type = "forking";
User = "root"; # User = "root";
ExecStart = ''${pkgs.xboxdrv}/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus disabled --silent --deadzone 4000 --deadzone-trigger 10% --mimic-xpad-wireless''; # ExecStart = ''${pkgs.xboxdrv}/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus disabled --silent --deadzone 4000 --deadzone-trigger 10% --mimic-xpad-wireless'';
}; # };
}; # };
services.xserver.config = '' # services.xserver.config = ''
Section "InputClass" # Section "InputClass"
Identifier "joystick catchall" # Identifier "joystick catchall"
MatchIsJoystick "on" # MatchIsJoystick "on"
MatchDevicePath "/dev/input/event*" # MatchDevicePath "/dev/input/event*"
Driver "evdev" # Driver "evdev"
Option "StartKeysEnabled" "False" # Option "StartKeysEnabled" "False"
Option "StartMouseEnabled" "False" # Option "StartMouseEnabled" "False"
EndSection # EndSection
''; # '';
boot.blacklistedKernelModules = ["xpad"]; # boot.blacklistedKernelModules = ["xpad"];
} }

View file

@ -38,13 +38,4 @@
optimise.automatic = true; optimise.automatic = true;
}; };
age.secrets.cachix.file = ../../secrets/cachix.age;
system.activationScripts = {
populate-netrc.text = ''
cat <<EOF> /etc/nix/netrc
machine mlabs.cachix.org login x password "$(cat ${config.age.secrets.cachix.path})"
EOF
'';
};
} }

37
packages/default.nix Normal file
View file

@ -0,0 +1,37 @@
{
inputs,
lib,
config,
...
}: {
options.fleet.overlays = let
overlayType = lib.mkOptionType {
name = "nixpkgs-overlay";
description = "nixpkgs overlay";
check = lib.isFunction;
merge = lib.mergeOneOption;
};
in
lib.mkOption {
description = "Nixpkgs overlays to apply at flake level (not in hosts)";
type = lib.types.listOf overlayType;
default = with inputs; [
agenix.overlays.default
comma.overlays.default
nur.overlay
nil.overlays.default
];
};
config.perSystem = {
system,
lib,
...
}: {
_module.args.pkgs =
lib.foldl
(legacyPackages: overlay: legacyPackages.extend overlay)
inputs.nixpkgsUnstable.legacyPackages.${system}
config.fleet.overlays;
};
}

19
shell/default.nix Normal file
View file

@ -0,0 +1,19 @@
{inputs, ...}: {
perSystem = {
pkgs,
config,
self',
...
}: {
devShells.default = pkgs.mkShell {
name = "fleet-shell";
buildInputs = with pkgs; [
git
agenix
];
shellHook = ''
export RULES="$(git rev-parse --show-toplevel)/secrets/default.nix";
'';
};
};
}

View file

@ -1,172 +0,0 @@
{
agenix,
comma,
homeManager,
nixosHardware,
nixpkgsUnstable,
nur,
preCommitHooks,
rock5b,
helix,
nom,
ccrEmacs,
self,
...
}: let
supportedSystems = {
x86_64-linux = "x86_64-linux";
aarch64-linux = "aarch64-linux";
};
pkgsFor = lib.genAttrs (lib.attrValues supportedSystems) (system: nixpkgsUnstable.legacyPackages.${system});
lib = nixpkgsUnstable.lib.extend (self: super: {
perSystem = super.genAttrs (super.attrValues supportedSystems);
});
mkConfiguration = {
name,
system,
modules ? [],
}:
lib.nixosSystem {
inherit system;
modules =
[
({pkgs, ...}: {
networking.hostName = lib.mkForce name;
home-manager.users.ccr.imports = [
ccrEmacs.hmModules.default
];
age = {
identityPaths = ["/home/ccr/.ssh/id_rsa"];
secrets = lib.mapAttrs' (name: _: {
name = lib.removeSuffix ".age" (builtins.baseNameOf name);
value.file = ./.. + "/${name}";
}) (import ../secrets);
};
nixpkgs.overlays = [
agenix.overlay
comma.overlays.default
nur.overlay
(_: self: {
helix = helix.packages.${pkgs.system}.helix-dev;
nom = nom.packages.${pkgs.system}.default or (self.runCommandLocal "empty" {} "touch $out");
})
];
})
(../hosts + "/${name}")
homeManager.nixosModule
agenix.nixosModule
]
++ modules;
specialArgs = {
# The following paths (../modules and ../hmModules) are relative to the location
# where they are imported, *not* from here
fleetModules = moduleNames: builtins.map (moduleName: ../modules + "/${moduleName}") moduleNames;
fleetHmModules = moduleNames: builtins.map (moduleName: ../hmModules + "/${moduleName}") moduleNames;
};
};
nixosConfigurations = {
thinkpad = mkConfiguration {
name = "thinkpad";
system = supportedSystems.x86_64-linux;
modules = [nixosHardware.nixosModules.lenovo-thinkpad-x1-7th-gen];
};
hs = mkConfiguration {
name = "hs";
system = supportedSystems.x86_64-linux;
};
pbp = mkConfiguration {
name = "pbp";
system = supportedSystems.aarch64-linux;
modules = ["${nixosHardware}/pine64/pinebook-pro"];
};
# Retired but it could be still usefull, so I'm not deleting it
# beebox = mkConfiguration {
# name = "beebox";
# system = supportedSystems.x86_64-linux;
# };
rock5b = mkConfiguration {
name = "rock5b";
system = supportedSystems.aarch64-linux;
modules = [rock5b.nixosModules.kernel rock5b.nixosModules.fan-control];
};
};
mkVmApp = system: configuration: let
shellScript = pkgsFor.${system}.writeShellScript "run-vm" ''
${configuration.config.system.build.vm}/bin/run-${configuration.config.networking.hostName}-vm
'';
in {
type = "app";
program = "${shellScript}";
};
mkVmApps = configurations:
lib.perSystem (system:
lib.genAttrs (lib.attrNames configurations) (
configurationName:
mkVmApp system configurations.${configurationName}
));
formatter = lib.perSystem (system: pkgsFor.${system}.alejandra);
formatApp = lib.perSystem (
system: {
format = {
type = "app";
program = "${pkgsFor.${system}.alejandra}/bin/alejandra";
};
}
);
checkFormatting = flakePath:
lib.perSystem (
system: let
pkgs = pkgsFor.${system};
in {
check-nix-formatting = pkgs.runCommand "check-nix-formatting" {buildInputs = [pkgs.alejandra];} "alejandra --check ${flakePath} > $out";
}
);
checkFormattingHook = lib.perSystem (
system: {
nix = preCommitHooks.lib.${system}.run {
src = self;
hooks.alejandra = {
enable = true;
entry = lib.mkForce formatApp.${system}.format.program;
};
};
}
);
mkDevShell = lib.perSystem (system: let
pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
shellHook =
checkFormattingHook.${system}.nix.shellHook
+ ''
export RULES="$(git rev-parse --show-toplevel)/secrets/default.nix";
'';
packages = with pkgs; [
git
agenix.packages.${system}.agenix
];
};
});
in {
inherit
checkFormatting
formatApp
formatter
lib
mkDevShell
mkVmApps
nixosConfigurations
supportedSystems
;
}